openseg-group / OCNet.pytorch

Please choose the openseg.pytorch project for the updated code that achieve SOTA on 6 benchmarks!
MIT License
812 stars 128 forks source link

OHEM implement #27

Open MissDores opened 6 years ago

MissDores commented 6 years ago

I have implemented the tensorflow code of OHEM according to your code. Several inputs are tested to make the output of my implementation the same with yours. I wonder wether you train your model using OHEM at the beginning of your training or finetune with OHEM after the first phase training finished. In my case, I trained with OHEM at the begining, and the problem is that, my loss stayed fluctant and no trend of decending. Can you give me some suggestions? Thank you very much!

PkuRainBow commented 5 years ago

I would recommend to you try our code base.

lxtGH commented 5 years ago

@MissDores Hi, I met same problem with you. But I fintuned the model with OHEM, the loss didn't decend. Have you found the reasons?

MissDores commented 5 years ago

Sorry, I haven't found the reasons until now. One odd thing is that when I trained from begining, though the training loss remained almost the same, the accuracy on the test set seems increasing and the final results are not higher than the situation without my implementation of OHEM. I am sure there is noing wrong with my dataset. @lxtGH