SegNet-Tutorial icon indicating copy to clipboard operation
SegNet-Tutorial copied to clipboard

setting num_output for arbitrary dataset

Open lhoangan opened this issue 7 years ago • 1 comments

I'm not sure if this is considered an issue. I am raising up here after quite some time struggling (and googling) with a hope to get some discussion (if it is a right place, otherwise my apology) or help someone who is struggling like me.

With a dataset of n+1 labels (n classes with 1 unknown ignored label), if the unknown label is the last label (like the case of CamVid, n = 11 classes (from 0 to 10) + unknown label 11), we'll set num_output: n and ignore_label : n (like the example at https://github.com/alexgkendall/SegNet-Tutorial/blob/master/Models/segnet_train.prototxt#L1523)

If the unknown label is set to 0 (like the case of SUN, unknown label 0 + 37 classes (from 1 to 37)), we'll set num_output: n+1 and ignore_label: 0 (like the example at https://github.com/alexgkendall/SegNet-Tutorial/blob/master/Example_Models/train_segnet_sun.prototxt#L1603). And depending on the num_output, we'll have to supply the corresponding number of class_weighting, i.e. n+1 lines. If the num_output is only n it'll bounce back some errors like Check failed: status == CUBLAS_STATUS_SUCCESS (11 vs. 0) CUBLAS_STATUS_MAPPING_ERROR

I'm not sure if it is a correct 'instruction', but this is what's been working so far to me. I am also not sure about the behavior of the net in the second case, more discussions are welcome

lhoangan avatar May 02 '17 16:05 lhoangan

Some experts pls comment

ArunJ1 avatar Mar 05 '19 11:03 ArunJ1