深度学习
知吾不知
这个作者很懒,什么都没留下…
展开
-
torchtext错误“Python int too large to convert to C long”
在使用torchtext时 遇到的问题: 导致问题原因是:pytorch 与 torchtext 版本的不兼容 解决办法:使用可相互兼容的 例子:我使用的环境为pytorch 1.1.0,torchtext 0.3.1可正常使用 安装指定torchtext指定版本的方法:pip install torchtext == 0.3.1 ...原创 2019-12-13 14:44:40 · 836 阅读 · 1 评论 -
pytorch入门程序1
一、构建三层神经分类网络 输入维度为1000,隐藏层为100维,输出层为10维。激活函数使用ReLU函数,本程序的写法有两个,为了对比体现,现贴出两个的代码,供对比学习。 1、使用Sequential构建神经网络 import torch #N为一个batch_size N,D_in,H,D_out=64,1000,100,10 x=torch.randn(N,D_in) y=torch...原创 2019-12-13 14:26:46 · 353 阅读 · 0 评论