YoungGod / DFR

Project: Unsupervised Anomaly Segmentation via Deep Feature Reconstruction
90 stars 25 forks source link

extractor.train()? #3

Open yunsangq opened 3 years ago

yunsangq commented 3 years ago

Hi, Thanks for your code!!

extractor was not included in the optimizer parameter. So, I think the extractor was only used for inference, but wonder why used train(). In this case, batch_norm different results than eval(). because running_mean, running_var changed when train().

https://github.com/YoungGod/DFR/blob/530779514bba281acb4f9be2c1c96a1b41909cbb/DFR-source/anoseg_dfr.py#L148

https://github.com/YoungGod/DFR/blob/530779514bba281acb4f9be2c1c96a1b41909cbb/DFR-source/anoseg_dfr.py#L207

https://github.com/YoungGod/DFR/blob/530779514bba281acb4f9be2c1c96a1b41909cbb/DFR-source/anoseg_dfr.py#L78