Expected tensor for argument #1 ‘indices‘ to have one of the following scalar types: Long, Int; but
生活随笔
收集整理的這篇文章主要介紹了
Expected tensor for argument #1 ‘indices‘ to have one of the following scalar types: Long, Int; but
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
RuntimeError: Expected tensor for argument #1 'indices' to
have one of the following scalar types: Long, Int;
but got torch.FloatTensor instead (while checking arguments for embedding)
解決:
轉(zhuǎn)成long類型才能作為nn.embedding的輸入
總結(jié)
以上是生活随笔為你收集整理的Expected tensor for argument #1 ‘indices‘ to have one of the following scalar types: Long, Int; but的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: torc中abs()和abs_()的区别
- 下一篇: Python语言程序设计 第一周习题