8000 Remove deep copy · zyuh/segmentation_models.pytorch@692d331 · GitHub
[go: up one dir, main page]

Skip to content

Commit 692d331

Browse files
committed
Remove deep copy
1 parent eec0635 commit 692d331

File tree

1 file changed

+2
-2
lines changed
  • segmentation_models_pytorch/encoders

1 file changed

+2
-2
lines changed

segmentation_models_pytorch/encoders/resnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
number of feature tensors = 6 (one with same resolution as input and 5 downsampled),
2323
depth = 3 -> number of feature tensors = 4 (one with same resolution as input and 3 downsampled).
2424
"""
25-
from copy import deepcopy
25+
from copy import copy
2626

2727
import torch.nn as nn
2828

@@ -107,7 +107,7 @@ def load_state_dict(self, state_dict, **kwargs):
107107
}
108108
}
109109

110-
pretrained_settings = deepcopy(pretrained_settings)
110+
pretrained_settings = copy(pretrained_settings)
111111
for model_name, sources in new_settings.items():
112112
if model_name not in pretrained_settings:
113113
pretrained_settings[model_name] = {}

0 commit comments

Comments
 (0)
0