mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Update unet.py (#1955)
This commit is contained in:
@@ -99,7 +99,10 @@ class Up(nn.Module):
|
||||
super().__init__()
|
||||
self.upsample = None
|
||||
if bilinear:
|
||||
self.upsample = nn.Upsample(scale_factor=2, mode='bilinear', align_corners=True)
|
||||
self.upsample = nn.Sequential(
|
||||
nn.Upsample(scale_factor=2, mode="bilinear", align_corners=True),
|
||||
nn.Conv2d(in_ch, in_ch // 2, kernel_size=1),
|
||||
)
|
||||
else:
|
||||
self.upsample = nn.ConvTranspose2d(in_ch, in_ch // 2, kernel_size=2, stride=2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user