欢迎光临散文网 会员登陆 & 注册

DAPP马蹄链智能合约系统开发(案例详细)丨DAPP马蹄链开发源码成品

2023-03-22 10:50 作者:bili_82084884250  | 我要投稿

  随着信息技术和通信技术的不断进步,我们已经步入了智能工业时代。在这个时代,各种智能技术的应用正在推动着工业的升级和转型,人工智能技术、5G技术和工业互联网技术等新一代信息技术正在不断推进着时代进步和发展。


  人工智能技术是智能工业时代的核心技术之一。人工智能技术包括机器学习、深度学习、自然语言处理、计算机视觉等。这些技术的应用使得机器能够自主地学习、理解和判断,可以帮助工业企业实现自动化、智能化和高效化的生产和管理。


  sent_tokens=fine_grade_tokenize(sen,tokenizer)


  encode_dict=tokenizer.encode_plus(text=sent_tokens,


  max_length=MAX_SEQ_LEN,


  is_pretokenized=True,


  pad_to_max_length=True,


  return_tensors='pt',


  return_token_type_ids=True,


  return_attention_mask=True)


  batch_size=32


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


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


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


  input1=encode_dict['input_ids']


  input2=encode_dict['attention_masks']


  input3=encode_dict['token_type_ids']


  batch_input1=torch.repeat_interleave(input1,repeats=batch_size,dim=0)


  batch_input2=torch.repeat_interleave(input2,repeats=batch_size,dim=0)


  batch_input3=torch.repeat_interleave(input3,repeats=batch_size,dim=0)


  tensor_input0=torch.LongTensor(batch_input1)


  tensor_input1=torch.LongTensor(batch_input2)


  tensor_input2=torch.LongTensor(batch_input3)


  开发需求I35模式7O98案例O7I8


  通过torch.onnx.export接口进行转换,其中input_names,out_names是模型的输入输出在模型构建时取的名字。


  input_names=['input_ids','input_masks','token_type_ids']


  outputs_names=['output1','output2']


  onnx_name='convert.onnx'


  torch.onnx.export(model,(),onnx_name,input_names=input_names,


  output_names=outputs_names,verbose=True,opset_version=11,


  dynamic_axes={'input_ids':{0:'batch_size'},


  {'input_masks':{0:'batch_size'},


  {'token_type_ids':{0:'batch_size'},


  {'output1':{0:'batch_size'},


  {'output2':{0:'batch_size'}})


  batch输入必须设置dynamic_axes,不然batch推理就不行了


DAPP马蹄链智能合约系统开发(案例详细)丨DAPP马蹄链开发源码成品的评论 (共 条)

分享到微博请遵守国家法律