Commit 9f69b642 authored by suilin0432's avatar suilin0432
Browse files

update

parent 0813a733
......@@ -69,7 +69,6 @@ class FrozenBatchNorm2d(nn.Module):
self, state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs
):
version = local_metadata.get("version", None)
print(local_metadata)
if version is None or version < 2:
# No running_mean/var in early versions
# This will silent the warnings
......@@ -81,7 +80,8 @@ class FrozenBatchNorm2d(nn.Module):
# NOTE: if a checkpoint is trained with BatchNorm and loaded (together with
# version number) to FrozenBatchNorm, running_var will be wrong. One solution
# 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(".")))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment