Skip to content

Commit

Permalink
Add kwargs to SWSLResNeXt101Encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodAxe committed Jan 3, 2024
1 parent 821f91b commit c3d8fa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pytorch_toolbelt/modules/encoders/timm/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ def change_input_channels(self, input_channels: int, mode="auto", **kwargs):


class SWSLResNeXt101Encoder(EncoderModule):
def __init__(self, pretrained=True, layers=None, activation=ACT_RELU):
def __init__(self, pretrained=True, layers=None, activation=ACT_RELU, **kwargs):
if layers is None:
layers = [1, 2, 3, 4]
from timm.models.resnet import swsl_resnext101_32x8d

act_layer = get_activation_block(activation)
encoder = swsl_resnext101_32x8d(pretrained=pretrained, act_layer=act_layer)
encoder = swsl_resnext101_32x8d(pretrained=pretrained, act_layer=act_layer, **kwargs)
super().__init__([64, 256, 512, 1024, 2048], [2, 4, 8, 16, 32], layers)
self.stem = nn.Sequential(
OrderedDict(
Expand Down

0 comments on commit c3d8fa8

Please sign in to comment.