Skip to content

Commit a76967c

Browse files
committed
Remove unnecessary print
1 parent 32f3c07 commit a76967c

File tree

1 file changed

+2
-3
lines changed
  • segmentation_models_pytorch/base

1 file changed

+2
-3
lines changed

segmentation_models_pytorch/base/model.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SegmentationModel(torch.nn.Module, SMPHubMixin):
2323
def __new__(cls: Type[T], *args, **kwargs) -> T:
2424
instance = super().__new__(cls, *args, **kwargs)
2525
return instance
26-
26+
2727
def __init__(self):
2828
super().__init__()
2929
self._is_encoder_frozen = False
@@ -166,13 +166,12 @@ def train(self, mode: bool = True):
166166
raise ValueError("training mode is expected to be boolean")
167167
self.training = mode
168168
for name, module in self.named_children():
169-
print(name)
170169
# skip encoder if it is frozen
171170
if self._is_encoder_frozen and name == "encoder":
172171
continue
173172
module.train(mode)
174173
return self
175-
174+
176175
def _set_encoder_trainable(self, mode: bool):
177176
for param in self.encoder.parameters():
178177
param.requires_grad = mode

0 commit comments

Comments
 (0)