ERNIE-text-classification-pytorch icon indicating copy to clipboard operation
ERNIE-text-classification-pytorch copied to clipboard

RuntimeError: Expected tensor for argument #1 'indices' to have scalar type Long; but got CUDAType instead (while checking arguments for embedding)

Open ghost opened this issue 6 years ago • 2 comments

运行python fine_tune_ernie.py.py出错: RuntimeError: Expected tensor for argument #1 'indices' to have scalar type Long; but got CUDAType instead (while checking arguments for embedding)

ghost avatar Jul 04 '19 01:07 ghost

@yuhang1993115 改下input的数据类型

lonePatient avatar Jul 04 '19 01:07 lonePatient

我也遇到这个问题了,修改数据类型成 Tensor.int64也还报错

stubbornwdb avatar Mar 25 '20 12:03 stubbornwdb