OpenNRE_for_Chinese icon indicating copy to clipboard operation
OpenNRE_for_Chinese copied to clipboard

train error

Open XiaChaoStudio opened this issue 5 years ago • 1 comments

Traceback (most recent call last): File "./learn.py", line 42, in is_training=True) File "./learn.py", line 29, in learn con.train() File "/home/xiachao/workspace/OpenNRE_for_Chinese-master/config.py", line 251, in train loss = self.train_one_step() File "/home/xiachao/workspace/OpenNRE_for_Chinese-master/config.py", line 224, in train_one_step self.acc_not_NA.add(prediction == self.batch_label[i]) TypeError: eq() received an invalid combination of arguments - got (numpy.int64), but expected one of:

  • (Tensor other) didn't match because some of the arguments have invalid types: (numpy.int64)
  • (Number other) didn't match because some of the arguments have invalid types: (numpy.int64)

How to solve this problem?

XiaChaoStudio avatar May 13 '19 12:05 XiaChaoStudio