五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

FDF互助游戲開發(fā)原理丨FDF互助智能合約游戲系統(tǒng)開發(fā)(開發(fā)規(guī)則及詳情)

2023-03-07 16:10 作者:bili_16249894763  | 我要投稿

  From Web1.0 to Web3.0,from user read-only to user owned.Web1.0 is a read-only network,a static and one-way network,representing browsers and e-commerce;Web 2.0 pays more attention to user interaction.Users are both browsers and content producers.


The mode of development is from"read"to"write",and the representative products are social media and short video platforms;Web3.0 is the Internet of Value,and Web3.0 is a set of inclusive protocols that provide building blocks for application manufacturers


  void Calibration::_fake_quant_weights(){


  //找到權(quán)重中最大值(絕對值)的lamda函數(shù)


  auto findAbsMax=[&](const float*weights,const int size){


  float absMax=0;


  for(int i=0;i<size;i++){


  if(std::fabs(weights<i>)>absMax){


  absMax=std::fabs(weights<i>);


  }


  }


  return absMax;


  };


  for(const auto&op:_originaleModel->oplists){


  //跳過指定不需要量化的op,以及非Convolution


  std::vector<std::string>::iterator iter=std::find(_skip_quant_ops.begin(),_skip_quant_ops.end(),op->name);


  if(iter!=_skip_quant_ops.end()){需求及詳情I35模式7O98開發(fā)O7I8


  continue;


  }


  const auto opType=op->type;


  if(opType!=MNN::OpType_Convolution&&opType!=MNN::OpType_ConvolutionDepthwise){


  continue;


  }開發(fā)功能及源碼:MrsFu123


  auto param=op->main.AsConvolution2D();


  const int kernelNum=param->common->outputCount;


  std::vector<float>weights=param->weight;


  const int weightSize=weights.size();


  const int kernelSize=weightSize/kernelNum;


  //對每個kernel進(jìn)行量化


  for(int i=0;i<kernelNum;i++){


  const int offset=i*kernelSize;


  float absMax=findAbsMax(weights.data()+offset,kernelSize);


  float scale=absMax/_weightClampValue;//根據(jù)最大值計算縮放因子


  if(absMax<1e-6f){


  scale=absMax;


  }


  for(int j=0;j<kernelSize;j++){


  float value=weights[offset+j];


  float quantValue=std::round(value/scale);//量化到int8的值


  float clampedValue=std::max(std::min(quantValue,_weightClampValue),-_weightClampValue);//小于-127的部分,映射到-127


  float dequantValue=scale*clampedValue;


  param->weight[offset+j]=dequantValue;//反量化


  }


  }


  }


  }


FDF互助游戲開發(fā)原理丨FDF互助智能合約游戲系統(tǒng)開發(fā)(開發(fā)規(guī)則及詳情)的評論 (共 條)

分享到微博請遵守國家法律
朝阳市| 伊金霍洛旗| 崇明县| 涿州市| 双鸭山市| 甘洛县| 高要市| 巴南区| 元谋县| 瓮安县| 荔浦县| 桦川县| 乾安县| 静乐县| 名山县| 广州市| 万宁市| 吴江市| 盐源县| 秦皇岛市| 河西区| 南宁市| 石河子市| 沈丘县| 南木林县| 长治县| 洞头县| 子长县| 福安市| 开江县| 都安| 阿鲁科尔沁旗| 南康市| 高密市| 榆林市| 阿巴嘎旗| 江华| 滨州市| 广德县| 肃南| 济阳县|