Vegeta2020 / SE-SSD

SE-SSD: Self-Ensembling Single-Stage Object Detector From Point Cloud, CVPR 2021.
Apache License 2.0
811 stars 128 forks source link

how to update ema variables in different models, such as a big model and a small model ; #89

Closed qiuhui1991 closed 2 years ago

qiuhui1991 commented 2 years ago

def update_ema_variables(model, ema_model, global_step): alpha = min(1 - 1 / (global_step + 1), 0.999) for ema_param, param in zip(ema_model.parameters(), model.parameters()): emaparam.data.mul(alpha).add_(1 - alpha, param.data)

in different model, the function update_ema_variables produced error

Vegeta2020 commented 2 years ago

@qiuhui1991 Can you give the traceback for your produced error? I guess it may be related with the settings of model/ema_model.