Tencent / tencent-ml-images

Largest multi-label image database; ResNet-101 model; 80.73% top-1 acc on ImageNet
Other
3.06k stars 515 forks source link

can you explain the loss funtion? and how to use it with data? #31

Open alexliyang opened 6 years ago

alexliyang commented 6 years ago

I can not understand the loss function , can you explain it? and if I want to reference, what should I do to prepare the train data?

thanks a lot

wubaoyuan commented 5 years ago

@alexliyang Please wait for our arxiv manuscript, which will provide a detailed definition of the loss function.

alexliyang commented 5 years ago

thx a lot

Now I want to train a classical model, samples do not use bbox , only classic labels, how to use your loss function?

Thanks

wubaoyuan commented 5 years ago

@alexliyang In the provided code, we also didn't use bbox. So you can directly copy the code of the loss function. Our Arxiv manuscript is expected to be released in one week.

alexliyang commented 5 years ago

OK, thanks, I will use this loss to train my model.

and another question: my class_num is 10, whether I should add 1 to class_num i.e. class_num = 11 when I train the model or not ? and in fact i only have 10 classes sample data.

Thanks

wubaoyuan commented 5 years ago

@alexliyang You mean adding a rejection class? We have not tried that. The main difficulty may be how to obtain the training sample for the rejection class. If you train with 10 classes, if the posteriors of all classes are lower than a threshold, it can be considered as rejection.

alexliyang commented 5 years ago

@wubaoyuan thanks, although I do not understand your loss function , now I copy it and use it to train my model, I find that ,the every step loss value and mean loss value are smaller than the value from softmax_cross_entropy_with_logits function, but the test acc is not better than using softmax_cross_entropy_with_logits function. Maybe I used it not correctly

Jason-xin commented 5 years ago

@wubaoyuan Have you Arxiv manuscript been released?

wubaoyuan commented 5 years ago

@Jason-xin Already finished, in proof-reading. Maybe one week.

WillLiGitHub commented 4 years ago

you can see the function: torch.nn.BCEWithLogitsLoss()