Skip to content

Commit

Permalink
Corrected forward pass of UNet
Browse files Browse the repository at this point in the history
The operations up3, up2, and up1 were not defined. Use instead enc3, enc2 and enc1.
  • Loading branch information
AndreiCostinescu committed Jun 11, 2017
1 parent 0f62346 commit e989984
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions piwise/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ def forward(self, x):
center = self.center(dec4)
enc4 = self.enc4(torch.cat([
center, F.upsample_bilinear(dec4, center.size()[2:])], 1))
enc3 = self.up3(torch.cat([
enc3 = self.enc3(torch.cat([
enc4, F.upsample_bilinear(dec3, enc4.size()[2:])], 1))
enc2 = self.up2(torch.cat([
enc2 = self.enc2(torch.cat([
enc3, F.upsample_bilinear(dec2, enc3.size()[2:])], 1))
enc1 = self.up1(torch.cat([
enc1 = self.enc1(torch.cat([
enc2, F.upsample_bilinear(dec1, enc2.size()[2:])], 1))

return F.upsample_bilinear(self.final(enc1), x.size()[2:])
Expand Down Expand Up @@ -357,4 +357,4 @@ def forward(self, x):
], 1))
print('final', x.size())

return F.upsample_bilinear(final, x.size()[2:])
return F.upsample_bilinear(final, x.size()[2:])

0 comments on commit e989984

Please sign in to comment.