Jun-CEN / PSL

[CVPR 2023] Enlarge Instance-specific and Class-specific Information for Open-set Action Recognition
26 stars 1 forks source link

The inquiry about SoftMax performance reproduce #1

Open gersys opened 1 year ago

gersys commented 1 year ago

Dear Jun Cen

I'm Cheol-Ho Cho and I'm a graduate student at Sungkyunkwan University in Korea Thank you for your great work.

I read your work recently and I have a question about your work: Actually, I want to reproduce Softmax performance in your paper

But, I couldn't find the specific setting of Softmax performances in your paper and code.

So could you tell me the specific setting of Softmax performance in the paper? (ex. pretraining, epoch, optimizer, preprocessing, augmentation... etc)

Maybe I think it's best If you upload the 'softmax' configuration file (ex. tsm_softmax.yaml)

If you could assist me, I would be grateful.

Thank you very much for your time.

Best regards, Cheol-Ho

Jun-CEN commented 1 year ago

Hi,

Thanks for your interest. This work is done when I was in intern in Alibaba, but I already leave the company and cannot reach the corresponding config file. Here are my tips. You could define a cross-entropy loss here which shouldn't be difficult: https://github.com/Jun-CEN/PSL/blob/6460af2abc1fb18e2cdb844507f80ea5330c8c0e/models/utils/losses.py#L188

Don't forget to change the corresponding loss type to your own defined loss name here: https://github.com/Jun-CEN/PSL/blob/6460af2abc1fb18e2cdb844507f80ea5330c8c0e/configs/projects/openset/tsm/tsm_psl.yaml#L8

Note that the uncertainty score calculation method should also be changed according to: https://github.com/Jun-CEN/PSL/blob/6460af2abc1fb18e2cdb844507f80ea5330c8c0e/tools/test_net_open.py#L164 The corresponding config is here: https://github.com/Jun-CEN/PSL/blob/6460af2abc1fb18e2cdb844507f80ea5330c8c0e/configs/projects/openset/tsm/tsm_psl.yaml#L39 The learning rate can be found in the Appendix C of our paper, including with and without K400 pretraining.

gersys commented 1 year ago

Thank you for your kind reply

I follow your advice and run the code but some errors occur for the difference between the PSL input shape and Softmax input

the error example is below

return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing) TypeError: cross_entropy_loss(): argument 'input' (position 1) must be Tensor, not tuple

Could you update the code or make a new config file that runs well?

It would be very appreciated if you help me.

Thanks for your time