ICode9

精准搜索请尝试: 精确搜索
  • pytorch中nn.Embedding()的用法2022-07-18 23:35:18

    记得在代码的开始引入 import torch import torch.nn as nn 举个常用的例子 #以下代码为pytorch的python代码 embedding = nn.Embedding(10, 3) print(embedding.weight) input = torch.LongTensor([[0, 2, 0, 5]]) print(input) print(embedd

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有