Skip to content

Commit

Permalink
troubleshooting 3
Browse files Browse the repository at this point in the history
  • Loading branch information
namsaraeva committed May 16, 2024
1 parent 9c2800c commit eedfc5a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/sparcscore/ml/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def __init__(self,

super(VGG2_regression, self).__init__()

self.norm = nn.BatchNorm2d(in_channels)
self.norm = nn.BatchNorm2d(512)

self.features = self.make_layers(self.cfgs[cfg], in_channels)
self.classifier = self.make_layers_MLP(self.cfgs_MLP[cfg_MLP], self.cfgs[cfg], regression=True) # regression is set to True to make the final layer a single output
Expand All @@ -183,10 +183,7 @@ def vgg(cfg, in_channels, **kwargs):
return model

def forward(self, x):

num_of_channels = x.shape[1]

x = nn.BatchNorm2d(num_of_channels)(x)
x = self.norm(x)
x = self.features(x)

x = torch.flatten(x, 1)
Expand Down

0 comments on commit eedfc5a

Please sign in to comment.