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.
說說Python中的垃圾回收機制?
2.
螞蟻金服面試分享,阿里的offer真的不難,3位朋友全部offer
3.
Spring Boot (三十一)——自定義歡迎頁及favicon
4.
Spring Boot核心架構
5.
IDEA創建maven web工程
6.
在IDEA中利用maven創建java項目和web項目
7.
myeclipse新導入項目基本配置
8.
zkdash的安裝和配置
9.
什麼情況下會導致Python內存溢出?要如何處理?
10.
CentoOS7下vim輸入中文
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<