什么是火币/币安/OK/欧易OKEX交易所系统开发,火币/币安/OK/欧易OKEX交易所开发源码
The user interface is the core content of how traders view the exchange.All user interfaces must be user-friendly and intuitive.It may sound tacky,but your goal is to provide your customers with a good trading experience.The user interface must also be mobile friendly,because the use of smart phones is increasing.Applications developed specifically for mobile devices will make exchanges easier to access and will also strengthen trading activities.
It can complete the application of multiple terminals such as the transaction system on the PC side and the mobile phone side,and can observe the transaction data anywhere,so as to facilitate and facilitate the transaction.The advantage of the blockchain exchange distributed framework is that it decouples different operating systems and modules,reduces the interdependence between subsystems and sub-modules,and each module can be independently developed and deployed without mutual interference,which is conducive to rapid development and fault location.
void Calibration::_initMaps(){
_featureInfo.clear();
_featureInfoOrigin.clear();
_opInfo.clear();//记录由未量化的权重计算所得到的所有输入输出tensor
_tensorMap.clear();
//run mnn once,initialize featureMap,opInfo map
//为input tensor和output tensor分配TensirStatistic对象,并构建映射关系
MNN::TensorCallBackWithInfo before=[&](const std::vector<MNN::Tensor*>&nTensors,const MNN::OperatorInfo*info){
std::string opName=info->name();
std::vector<std::string>::iterator iter=std::find(_skip_quant_ops.begin(),_skip_quant_ops.end(),opName);
if(iter!=_skip_quant_ops.end()){
return false;
}
_opInfo[opName].first=nTensors;
if(Helper::gNeedFeatureOp.find(info->type())!=Helper::gNeedFeatureOp.end()){
int i=0;开发细节及详细I35功能7O98设计O7I8
for(auto t:nTensors){
if(_featureInfo.find(t)==_featureInfo.end()){
_featureInfo[t]=std::shared_ptr<TensorStatistic>(
new TensorStatistic(t,_featureQuantizeMethod,opName+"input_tensor_"+flatbuffers::NumToString(i),_featureClampValue));
}
i++;
}
}
return false;
};详情及部署:MrsFu123
MNN::TensorCallBackWithInfo after=[this](const std::vector<MNN::Tensor*>&nTensors,
const MNN::OperatorInfo*info){
std::string opName=info->name();
std::vector<std::string>::iterator iter=std::find(_skip_quant_ops.begin(),_skip_quant_ops.end(),opName);
if(iter!=_skip_quant_ops.end()){
return true;
}
_opInfo[opName].second=nTensors;
if(Helper::gNeedFeatureOp.find(info->type())!=Helper::gNeedFeatureOp.end()){
int i=0;
for(auto t:nTensors){
if(_featureInfo.find(t)==_featureInfo.end()){
_featureInfo[t]=
std::shared_ptr<TensorStatistic>(new TensorStatistic(t,_featureQuantizeMethod,opName+"output_tensor_"+flatbuffers::NumToString(i),_featureClampValue));
}
i++;
}
}
return true;
};
_interpreter->runSessionWithCallBackInfo(_session,before,after);
MNN::TensorCallBackWithInfo beforeOrigin=[&](const std::vector<MNN::Tensor*>&nTensors,const MNN::OperatorInfo*info){
std::string opName=info->name();
std::vector<std::string>::iterator iter=std::find(_skip_quant_ops.begin(),_skip_quant_ops.end(),opName);
if(iter!=_skip_quant_ops.end()){
return false;
}
if(Helper::gNeedFeatureOp.find(info->type())!=Helper::gNeedFeatureOp.end()){
int i=0;
for(auto t:nTensors){
if(_featureInfoOrigin.find(t)==_featureInfoOrigin.end()){
_featureInfoOrigin[t]=std::shared_ptr<TensorStatistic>(
new TensorStatistic(t,_featureQuantizeMethod,opName+"input_tensor_"+flatbuffers::NumToString(i),_featureClampValue));
}
i++;
}
}
return false;
};
MNN::TensorCallBackWithInfo afterOrigin=[this](const std::vector<MNN::Tensor*>&nTensors,
const MNN::OperatorInfo*info){
std::string opName=info->name();
std::vector<std::string>::iterator iter=std::find(_skip_quant_ops.begin(),_skip_quant_ops.end(),opName);
if(iter!=_skip_quant_ops.end()){
return true;
}
if(Helper::gNeedFeatureOp.find(info->type())!=Helper::gNeedFeatureOp.end()){
int i=0;
for(auto t:nTensors){
if(_featureInfoOrigin.find(t)==_featureInfoOrigin.end()){
_featureInfoOrigin[t]=
std::shared_ptr<TensorStatistic>(new TensorStatistic(t,_featureQuantizeMethod,opName+"output_tensor_"+flatbuffers::NumToString(i),_featureClampValue));
}
i++;
}
}
return true;
};
_interpreterOrigin->runSessionWithCallBackInfo(_sessionOrigin,beforeOrigin,afterOrigin);
/**
*_tensorMap用于每个op输入输出tensor,并记录每个tensor的index。_opInfo是未量化的模型的执行结果
**/
for(auto&op:_originaleModel->oplists){
if(_opInfo.find(op->name)==_opInfo.end()){
continue;
}
for(int i=0;i<op->inputIndexes.size();++i){
_tensorMap[op->inputIndexes<i>]=_opInfo[op->name].first<i>;
}
for(int i=0;i<op->outputIndexes.size();++i){
_tensorMap[op->outputIndexes<i>]=_opInfo[op->name].second<i>;
}
}
if(_featureQuantizeMethod=="KL"){
//set the tensor-statistic method of input tensor as THRESHOLD_MAX
auto inputTensorStatistic=_featureInfo.find(_inputTensor);
if(inputTensorStatistic!=_featureInfo.end()){
inputTensorStatistic->second->setThresholdMethod(THRESHOLD_MAX);
}
}
}