DSB2017
DSB2017 copied to clipboard
IndexError: too many indices for array
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
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.
Please close this if the problem is solved. @lfz @nkh222
ydata=ydata.reshape(-1)