Skip to content

Commit c9bb8f7

Browse files
author
Virginia Fernandez
committed
out should never be none.
Co-authored-by: Virginia Fernandez <virginia.fernandez@kcl.ac.uk>
1 parent d5856ec commit c9bb8f7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

monai/networks/nets/diffusion_model_unet.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,10 +2063,9 @@ def forward(
20632063
h = h.reshape(h.shape[0], -1)
20642064

20652065
# 5. out
2066-
if self.out is None:
2067-
self.out = nn.Sequential(
2068-
nn.Linear(h.shape[1], 512), nn.ReLU(), nn.Dropout(0.1), nn.Linear(512, self.out_channels)
2069-
)
2066+
self.out = nn.Sequential(
2067+
nn.Linear(h.shape[1], 512), nn.ReLU(), nn.Dropout(0.1), nn.Linear(512, self.out_channels)
2068+
)
20702069
output: torch.Tensor = self.out(h)
20712070

20722071
return output

0 commit comments

Comments
 (0)