Skip to content

Commit

Permalink
refactor vic reg head
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Morris committed Jul 1, 2024
1 parent 3c53f9e commit a62cf88
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cyto_dl/nn/head/vic_reg.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ def __init__(self, dimensions=[2048, 8192, 8192, 8192]):
super().__init__()
layers = []
for i in range(len(dimensions) - 1):
layers.append(nn.Linear(dimensions[i], dimensions[i + 1]))
layers.append(nn.BatchNorm1d(dimensions[i + 1]))
layers.append(nn.ReLU(True))
layers += [
nn.Linear(dimensions[i], dimensions[i + 1]),
nn.BatchNorm1d(dimensions[i + 1]),
nn.ReLU(True),
]
layers.append(nn.Linear(dimensions[-2], dimensions[-1], bias=False))
self.model = nn.Sequential(*layers)

Expand Down

0 comments on commit a62cf88

Please sign in to comment.