tencent-ml-images icon indicating copy to clipboard operation
tencent-ml-images copied to clipboard

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

Open alexliyang opened this issue 6 years ago • 9 comments

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

alexliyang avatar Nov 30 '18 02:11 alexliyang

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

wubaoyuan avatar Nov 30 '18 05:11 wubaoyuan

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

alexliyang avatar Dec 03 '18 09:12 alexliyang

@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.

wubaoyuan avatar Dec 03 '18 10:12 wubaoyuan

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

alexliyang avatar Dec 04 '18 01:12 alexliyang

@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.

wubaoyuan avatar Dec 04 '18 02:12 wubaoyuan

@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

alexliyang avatar Dec 04 '18 02:12 alexliyang

@wubaoyuan Have you Arxiv manuscript been released?

Jason-xin avatar Dec 11 '18 03:12 Jason-xin

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

wubaoyuan avatar Dec 11 '18 03:12 wubaoyuan

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

WillLiGitHub avatar Jul 16 '20 03:07 WillLiGitHub