LP流動性質押挖礦開發正式版丨LP流動性質押挖礦系統開發(詳細及案例)丨原始碼

xiaofufu發表於2023-04-04

  量化系統是一種基於區塊鏈技術的交易系統,它利用智慧合約來自動化交易操作,將交易資訊和資料記錄在區塊鏈上,保證交易的公開透明和資料的可靠性。量化系統是一種基於區塊鏈技術的交易系統,它利用智慧合約來自動化交易操作,將交易資訊和資料記錄在區塊鏈上,保證交易的公開透明和資料的可靠性。


  The characteristics of quantitative trading robots:


  1.The most obvious feature of quantitative trading is to reduce the impact of investor sentiment fluctuations,avoid making irrational investment decisions in extremely fanatical or pessimistic market situations,and avoid subjective assumptions.Quantitative trading robots use programs to turn their ideas into quantifiable strategies,using computers to only calculate and buy and sell strategies;開發策略唯:MrsFu123


  關於區塊鏈專案技術開發唯:MrsFu123,代幣發行、dapp智慧合約開發、鏈遊開發、單雙幣質押、多鏈錢包開發、NFT盲盒遊戲、公鏈、鏈上游戲開發


  Uniswap博餅、交易所開發、量化合約開發、合約對沖、互助遊戲開發、Nft數字藏品開發、眾籌互助開發、元宇宙開發、swap開發、DAO智慧合約、


  夾子合約、鏈上合約開發、ido開發、商城開發等,開發過各種各樣的系統模式,更有多種模式、制度、案例、後臺等,成熟技術團隊,歡迎實體參考。


  2.Historical backtesting,implemented using computer programs,can verify the rationality of trading strategies by quantifying trading ideas;


  3.Able to ensure the execution of transactions/profits,especially quantitative analysis at medium and low frequencies,without any supervision;


  from __future__ import absolute_import,print_function,division


  import os


  from rknn.api import RKNN


  #>


  >


  save_rknn_dir='G:/6666Ground_segmentation0813/rknn'#rknn儲存路徑


  if __name__=='__main__':


  #Create RKNN object


  rknn=RKNN()


  #pre-process config


  print('-->Config model')


  rknn.config(mean_values=[[83.0535,94.095,82.1865]],std_values=[[53.856,54.774,53.9325]],reorder_channel='2 1 0',target_platform=['rk1808'],batch_size=1,quantized_dtype='asymmetric_quantized-u8')#需要輸入為RGB#####需要轉化一下均值和歸一化的值


  #rknn.config(mean_values=[[0.0,0.0,0.0]],std_values=[[255,255,255]],reorder_channel='2 1 0',target_platform=['rv1126'],batch_size=1)#需要輸入為RGB


  print('done')


  model_name=onnx_model[onnx_model.rfind('/')+1:]


  #Load ONNX model


  print('-->Loading model%s'%model_name)


  ret=rknn.load_onnx(model=onnx_model)


  if ret!=0:


  print('Load%s failed!'%model_name)


  exit(ret)


  print('done')


  #Build model


  print('-->Building model')


  #ret=rknn.build(do_quantization=False,dataset='./quantization_dataset.txt',pre_compile=True)###路哥的版本pre_compil=True離線預編譯


  ret=rknn.build(do_quantization=True,dataset='G:/6666Ground_segmentation0813/rknntxt.txt',pre_compile=False)


  #do_quantization是否對模型進行量化,datase量化校正資料集,pre_compil模型預編譯開關,預編譯RKNN模型可以減少模型初始化時間,但是無法透過模擬器進行推理或效能評估


  if ret!=0:


  print('Build net failed!')


  exit(ret)


  print('done')


  #Export RKNN model


  print('-->Export RKNN model')


  #save_name=model_name.replace(os.path.splitext(model_name)[-1],"_no_quant.rknn")


  save_name=model_name.replace(os.path.splitext(model_name)[-1],"_quant.rknn")


  ret=rknn.export_rknn(os.path.join(save_rknn_dir,save_name))


  if ret!=0:


  print('Export rknn failed!')


  exit(ret)


  print('done')


  rknn.release()


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69956839/viewspace-2943775/,如需轉載,請註明出處,否則將追究法律責任。

相關文章