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.
gitlab4.0備份還原
2.
openstack
3.
深入探討OSPF環路問題
4.
代碼倉庫-分支策略
5.
Admin-Framework(八)系統授權介紹
6.
Sketch教程|如何訪問組件視圖?
7.
問問自己,你真的會用防抖和節流麼????
8.
[圖]微軟Office Access應用終於啓用全新圖標 Publisher已在路上
9.
微軟準備淘汰 SHA-1
10.
微軟準備淘汰 SHA-1
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<