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.
Android Studio3.4中出現某個項目全部亂碼的情況之解決方式
2.
Packet Capture
3.
Android 開發之 仿騰訊視頻全部頻道 RecyclerView 拖拽 + 固定首個
4.
rg.exe佔用cpu導致卡頓解決辦法
5.
X64內核之IA32e模式
6.
DIY(也即Build Your Own) vSAN時,選擇SSD需要注意的事項
7.
選擇深圳網絡推廣外包要注意哪些問題
8.
店鋪運營做好選款、測款的工作需要注意哪些東西?
9.
企業找SEO外包公司需要注意哪幾點
10.
Fluid Mask 摳圖 換背景教程
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<