LungLobeSegmentation icon indicating copy to clipboard operation
LungLobeSegmentation copied to clipboard

problem in convert_to_onehot in model_vnet3d_multilabel.py

Open anirban1513 opened this issue 4 years ago • 2 comments

Traceback (most recent call last): File "train.py", line 35, in trainVnet() File "train.py", line 31, in trainVnet [16, 8]) File "/home/ubuntu/new_lobe/model_vnet3d_multilabel.py", line 322, in train batch_ys_onehot = convert_to_one_hot(batch_ys, self.numclass) File "/home/ubuntu/new_lobe/model_vnet3d_multilabel.py", line 190, in convert_to_one_hot one_hoty = np.eye(numclass)[one_hoty.reshape(-1).astype(np.int)] IndexError: index 8 is out of bounds for axis 0 with size 7

anirban1513 avatar Dec 23 '20 02:12 anirban1513

the number class is 7,but your is 8,there is different.

junqiangchen avatar Aug 27 '21 01:08 junqiangchen

I am also having the same issue. I have attached the screenshot. can you please help me with that.[](url 1 )

Jishna04 avatar Jun 13 '22 10:06 Jishna04