YU1ut / MixMatch-pytorch

Code for "MixMatch - A Holistic Approach to Semi-Supervised Learning"
MIT License
633 stars 129 forks source link

fix parameter assignment bug #23

Closed dddzg closed 4 years ago

dddzg commented 4 years ago

There is a bug for WeightEMA in the original code. the assignment param = ema_param will not copy the weight from the "emamodel" to "model" due to the variable reference mechanism. So, it should be replaced with param.data.copy(ema_param.data)