yangsiyu007/SpaceNetExploration

train.py -> function check_accuracy -> accuracy formula is wrong

Closed this issue · 2 comments

need to fix this way:
acc = float(num_correct) / num_samples / ( preds.size(1)*preds.size(2))

    logging.info('number of samples %d, accuracy (perc.) (%.2f)' % ( num_samples, 100 * acc))

Thank you Markus. In the refactored version I'll change it to
accuracy = (y == preds).float().mean(), averaging over all samples in the batch and all pixels. I'll merge the refactored version (currently on branch batchai) in the coming weeks.

Merged.