Skip to content

Commit 23887fe

Browse files
authored
Merge branch 'dev' into release_1_5_1
2 parents fb212a5 + 9122739 commit 23887fe

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

monai/networks/nets/diffusion_model_unet.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import math
3535
from collections.abc import Sequence
3636
from functools import reduce
37-
from typing import Optional
3837

3938
import numpy as np
4039
import torch
@@ -2016,7 +2015,7 @@ def __init__(
20162015

20172016
last_dim_flattened = int(reduce(lambda x, y: x * y, input_shape) * channels[-1])
20182017

2019-
self.out: Optional[nn.Module] = nn.Sequential(
2018+
self.out: nn.Module = nn.Sequential(
20202019
nn.Linear(last_dim_flattened, 512), nn.ReLU(), nn.Dropout(0.1), nn.Linear(512, self.out_channels)
20212020
)
20222021

@@ -2063,9 +2062,6 @@ def forward(
20632062
h = h.reshape(h.shape[0], -1)
20642063

20652064
# 5. out
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-
)
20692065
output: torch.Tensor = self.out(h)
20702066

20712067
return output

0 commit comments

Comments
 (0)