txin96/VoxResNet

MemoryError

Opened this issue · 1 comments

when i run train.py,I have the following questions.

(tf-gpu) ubuntu@ubun:~/VoxResNet-master$ python train.py
reading data...
finished reading data.
Traceback (most recent call last):
File "train.py", line 29, in
labels = one_hot(labels, n_class)
File "/home/ubuntu/VoxResNet-master/utils.py", line 15, in one_hot
array2 = (np.arange(nb_classes) == labels[..., None]).astype(dtype=np.int32)
MemoryError
what should i do to solve it?

This one_hot function indeed has some bugs even though it works fine in our task. You can use tf.one_hot instead. And if you use tf.one_hot, you also need to modify some other codes in train.py.