Machine-Learning-Collection icon indicating copy to clipboard operation
Machine-Learning-Collection copied to clipboard

U-Net Model`s Accuracy decrease when use model.eval()

Open haobo724 opened this issue 4 years ago • 0 comments

Hi , I used the code from https://github.com/aladdinpersson/Machine-Learning-Collection/tree/master/ML/Pytorch/image_segmentation/semantic_segmentation_unet

to build an U-net then training on it and it works great, but I found in inference stage, If I use model.eval() the accuracy will strongly decrease. But Once I removed this line and let model run on train mode then the model will perform well.. I could find the reason, I have read some website which said maybe the Net invoke the same Batchnormlize layer in different position, But from the code I can`t see the same issues.

Anyone have any ideas?

haobo724 avatar Jul 25 '21 18:07 haobo724