DSB2017 icon indicating copy to clipboard operation
DSB2017 copied to clipboard

IndexError: too many indices for array

Open nkh222 opened this issue 7 years ago • 3 comments

what does this means?

File ".../DSB2017-master/training/classifier/trainval_classifier.py", line 73, in train_casenet tpn += np.sum(1==pred[ydata==1]) IndexError: too many indices for array

nkh222 avatar Oct 16 '17 06:10 nkh222

Just change the code to be pred[(ydata == 1).flatten)]. Do this for all of the ydata ones, or you can change it to ydata.flatten() before any of the boolean maskings.

bfan1256 avatar Dec 13 '17 20:12 bfan1256

Please close this if the problem is solved. @lfz @nkh222

bfan1256 avatar Jan 04 '18 15:01 bfan1256

ydata=ydata.reshape(-1)

wayneguo279 avatar Feb 21 '19 05:02 wayneguo279