MCPcopy Create free account
hub / github.com/PolymathicAI/AstroCLIP / ResNet18

Class ResNet18

downstream_tasks/property_estimation/baselines/modules.py:86–98  ·  view source on GitHub ↗

Modfied ResNet18.

Source from the content-addressed store, hash-verified

84
85
86class ResNet18(nn.Module):
87 """Modfied ResNet18."""
88
89 def __init__(self, n_out=1):
90 super(ResNet18, self).__init__()
91 self.resnet = models.resnet18(weights=None)
92 self.resnet.conv1 = nn.Conv2d(
93 3, 64, kernel_size=7, stride=2, padding=3, bias=False
94 )
95 self.resnet.fc = nn.Linear(512, n_out)
96
97 def forward(self, x):
98 return self.resnet(x)
99
100
101class MLP(nn.Sequential):

Callers 1

_initialize_modelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected