Skip to content

Commit 1cda9ca

Browse files
committed
rm: remove base model as unnecessary. adjust the Encoder class accordingly
1 parent 5fc95bb commit 1cda9ca

File tree

3 files changed

+5
-406
lines changed

3 files changed

+5
-406
lines changed

cellseg_models_pytorch/encoders/encoder.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@ def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, Tuple[torch.Tensor, ..
6262
"""Forward pass of the encoder and return all the features."""
6363
output, feats = self.encoder(x)
6464
return output, feats[::-1]
65+
66+
def freeze_encoder(self) -> None:
67+
"""Freeze the parameters of the encoeder."""
68+
for param in self.encoder.parameters():
69+
param.requires_grad = False

cellseg_models_pytorch/models/base/_base_model.py

Lines changed: 0 additions & 190 deletions
This file was deleted.

0 commit comments

Comments
 (0)