合约量化系统开发(详细策略)丨合约量化系统开发(成熟技术)及稳定版

88 阅读1分钟

  Artificial intelligence can be divided into two categories:weak artificial intelligence and strong artificial intelligence.Weak AI(also known as narrow AI)refers to AI systems that can only exhibit human intelligence in specific task areas.For example,voice recognition system,auto drive system,etc.Strong artificial intelligence(also known as generalized artificial intelligence)refers to an artificial intelligence system that can exhibit human like intelligence in various task fields like humans.

  openppl支持了三种模型:onnx、caffe、pytorch,其中pytorch和caffe是通过quantize_torch_model和quantize_caffe_model,先将模型转换成onnx模型,再调用quantize_onnx_model来实现量化的。开发I35流程7O98开发O7I8

  empty_ppq_cache

  def quantize_torch_model(

  model:torch.nn.Module,

  calib_dataloader:DataLoader,

  calib_steps:int,

  input_shape:List[int],

  platform:TargetPlatform,

  input_dtype:torch.dtype=torch.float,

  setting:QuantizationSetting=None,

  关于区块链项目技术开发唯:MrsFu123,代币发行、dapp智能合约开发、链游开发、多链钱包开发

  交易所开发、量化合约开发、互助游戏开发、Nft数字藏品开发、众筹互助开发、元宇宙开发、swap开发、

  链上合约开发、ido开发、商城开发等,开发过各种各样的系统模式,更有多种模式、制度、案例、后台等,成熟技术团队,欢迎实体参考。

  collate_fn:Callable=None,

  inputs:List[Any]=None,

  do_quantize:bool=True,

  onnx_export_file:str='onnx.model',

  device:str='cuda',

  verbose:int=0,

  )->BaseGraph:

  #dump pytorch model to onnx

  dump_torch_to_onnx(model=model,onnx_export_file=onnx_export_file,

  input_shape=input_shape,input_dtype=input_dtype,

  inputs=inputs,device=device)

  return quantize_onnx_model(onnx_import_file=onnx_export_file,

  calib_dataloader=calib_dataloader,calib_steps=calib_steps,collate_fn=collate_fn,

  input_shape=input_shape,input_dtype=input_dtype,inputs=inputs,setting=setting,

  platform=platform,device=device,verbose=verbose,do_quantize=do_quantize)