JavaShuo
栏目
标签
解决:TypeError: embedding(): argument ‘indices‘ (position 2) must be Tensor, not tuple
时间 2021-05-09
标签
debug
python
pytorch
栏目
CSS
繁體版
原文
原文链接
这里需要将注释行取消掉。至于为什么,咱也不懂。 因为检查之后发现,传入的数据其实是一个tuple 前面tensor是128组index组成的word_list,后面的tensor是每一句话对应的标签,共128个。 所以要将前面的数据拿出来放入模型进行训练,而不是整个tuple。 参考:https://blog.csdn.net/aioku/article/details/109367657
>>阅读原文<<
相关文章
1.
TypeError: list indices must be integers or slices, not tuple
2.
TypeError: tuple indices must be integers or slices, not str
3.
TypeError: conv2d(): argument ‘input‘ (position 1) must be Tensor, not NoneType
4.
list indices must be integers or slices, not tuple
5.
TypeError: name() argument 1 must be unicode, not str
6.
TypeError: write() argument must be str, not bytes
7.
TypeError: add() argument after * must be an iterable, not Settings
8.
pygame学习异常之TypeError: argument 1 must be 2-item sequence, not int
9.
python提示错误TypeError: write() argument must be str, not bytes
10.
type object argument after ** must be a mapping, not str
更多相关文章...
•
SVN 解决冲突
-
SVN 教程
•
Thymeleaf扩展2(Say Hello)
-
Thymeleaf 教程
•
Scala 中文乱码解决
•
PHP Ajax 跨域问题最佳解决方案
相关标签/搜索
indices
argument
typeerror
embedding
tensor
tuple
position
解决
embedding+lstm
not...else
Python
CSS
Spring教程
NoSQL教程
PHP 7 新特性
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
安装cuda+cuDNN
2.
GitHub的使用说明
3.
phpDocumentor使用教程【安装PHPDocumentor】
4.
yarn run build报错Component is not found in path “npm/taro-ui/dist/weapp/components/rate/index“
5.
精讲Haproxy搭建Web集群
6.
安全测试基础之MySQL
7.
C/C++编程笔记:C语言中的复杂声明分析,用实例带你完全读懂
8.
Python3教程(1)----搭建Python环境
9.
李宏毅机器学习课程笔记2:Classification、Logistic Regression、Brief Introduction of Deep Learning
10.
阿里云ECS配置速记
本站公众号
欢迎关注本站公众号,获取更多信息
相关文章
1.
TypeError: list indices must be integers or slices, not tuple
2.
TypeError: tuple indices must be integers or slices, not str
3.
TypeError: conv2d(): argument ‘input‘ (position 1) must be Tensor, not NoneType
4.
list indices must be integers or slices, not tuple
5.
TypeError: name() argument 1 must be unicode, not str
6.
TypeError: write() argument must be str, not bytes
7.
TypeError: add() argument after * must be an iterable, not Settings
8.
pygame学习异常之TypeError: argument 1 must be 2-item sequence, not int
9.
python提示错误TypeError: write() argument must be str, not bytes
10.
type object argument after ** must be a mapping, not str
>>更多相关文章<<