提交 0d10da51 编辑于 作者: suilin0432's avatar suilin0432
浏览文件

.

上级 9f69b642
......@@ -82,11 +82,11 @@ class FrozenBatchNorm2d(nn.Module):
# is to remove the version number from the checkpoint.
# 暂时注释掉, 不注释掉是训练不了的... 就很离谱, 不知道为什么这里要多余的操作一下
# if version is not None and version < 3:
# logger = logging.getLogger(__name__)
# logger.info("FrozenBatchNorm {} is upgraded to version 3.".format(prefix.rstrip(".")))
# # In version < 3, running_var are used without +eps.
# state_dict[prefix + "running_var"] -= self.eps
if version is not None and version < 3:
logger = logging.getLogger(__name__)
logger.info("FrozenBatchNorm {} is upgraded to version 3.".format(prefix.rstrip(".")))
# In version < 3, running_var are used without +eps.
state_dict[prefix + "running_var"] -= self.eps
super()._load_from_state_dict(
state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs
......
Supports Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册