SimJeg / FC-DenseNet

Fully Convolutional DenseNets for semantic segmentation.
487 stars 143 forks source link

local variable 'not_void' referenced before assignment #13

Closed ps48 closed 7 years ago

ps48 commented 7 years ago

I prepared the Camvid Dataloader and started the training run, but got the following error:

Number of Convolutional layers : 103 Number of parameters : 9425163 Compilation starts at 2017-03-13 11:42:25 Traceback (most recent call last): File "train.py", line 255, in initiate_training(cf) File "train.py", line 223, in initiate_training train(cf) File "train.py", line 108, in train I, U, acc = theano_metrics(pred, net.target_var, n_classes, void_labels) File "/home/ubuntu/FC-DenseNet/metrics.py", line 33, in theano_metrics U = T.setsubtensor(U[i], T.sum(T.or(y_true_i, y_pred_i) * not_void)) UnboundLocalError: local variable 'not_void' referenced before assignment

Anyhelp is appreciated. Thanks :)

ps48 commented 7 years ago

Also, I had no void classes in my dataset. Hence, get_void_labels function returns an empty list.

SimJeg commented 7 years ago

Hi! If you have no void class as in the CamVid dataset I know you can simply remove the not_void variable !