lonePatient / ERNIE-text-classification-pytorch

This repo contains a PyTorch implementation of a pretrained ERNIE model for text classification.
54 stars 24 forks source link

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

Open ghost opened 5 years ago

ghost commented 5 years ago

运行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)

lonePatient commented 5 years ago

@yuhang1993115 改下input的数据类型

stubbornwdb commented 4 years ago

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