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.
vs2019運行opencv圖片顯示代碼時,窗口亂碼
2.
app自動化 - 元素定位不到?別慌,看完你就能解決
3.
在Win8下用cisco ××× Client連接時報Reason 422錯誤的解決方法
4.
eclipse快速補全代碼
5.
Eclipse中Java/Html/Css/Jsp/JavaScript等代碼的格式化
6.
idea+spring boot +mabitys(wanglezapin)+mysql (1)
7.
勒索病毒發生變種 新文件名將帶有「.UIWIX」後綴
8.
【原創】Python 源文件編碼解讀
9.
iOS9企業部署分發問題深入瞭解與解決
10.
安裝pytorch報錯CondaHTTPError:******
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<