什么是火幣/幣安/OK/歐易OKEX交易所系統(tǒng)開(kāi)發(fā),火幣/幣安/OK/歐易OKEX交易所開(kāi)發(fā)源碼
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();//記錄由未量化的權(quán)重計(jì)算所得到的所有輸入輸出tensor
_tensorMap.clear();
//run mnn once,initialize featureMap,opInfo map
//為input tensor和output tensor分配TensirStatistic對(duì)象,并構(gòu)建映射關(guān)系
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;開(kāi)發(fā)細(xì)節(jié)及詳細(xì)I35功能7O98設(shè)計(jì)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用于每個(gè)op輸入輸出tensor,并記錄每個(gè)tensor的index。_opInfo是未量化的模型的執(zhí)行結(jié)果
**/
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);
}
}
}