You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "train.py", line 125, in train
self.config["batch_size"]):
File "/home/rejae/PycharmProjects/NLP-Project-master/text_classifier/data_helpers/eval_data.py", line 155, in next_batch
y = y[perm]
TypeError: only integer scalar arrays can be converted to a scalar index
需要将eval_data中:
def next_batch(self, x, y, batch_size):
perm = np.arange(len(x))
#print(type(y) is list) list need transfer to array.
#out_images = np.array(X_train)[indices.astype(int)]
np.random.shuffle(perm)
x = x[perm]
#y = y[perm]
y = np.array(y)[perm] #后修改
The text was updated successfully, but these errors were encountered:
File "train.py", line 125, in train
self.config["batch_size"]):
File "/home/rejae/PycharmProjects/NLP-Project-master/text_classifier/data_helpers/eval_data.py", line 155, in next_batch
y = y[perm]
TypeError: only integer scalar arrays can be converted to a scalar index
需要将eval_data中:
def next_batch(self, x, y, batch_size):
The text was updated successfully, but these errors were encountered: