| 92 | |
| 93 | class FusionNet(nn.Module): |
| 94 | def __init__(self): |
| 95 | super(FusionNet, self).__init__() |
| 96 | self.conv0 = conv(8, c, 3, 2, 1) |
| 97 | self.down0 = ResBlock(c, 2*c) |
| 98 | self.down1 = ResBlock(4*c, 4*c) |
| 99 | self.down2 = ResBlock(8*c, 8*c) |
| 100 | self.down3 = ResBlock(16*c, 16*c) |
| 101 | self.up0 = deconv(32*c, 8*c) |
| 102 | self.up1 = deconv(16*c, 4*c) |
| 103 | self.up2 = deconv(8*c, 2*c) |
| 104 | self.up3 = deconv(4*c, c) |
| 105 | self.conv = nn.Conv2d(c, 16, 3, 1, 1) |
| 106 | self.up4 = nn.PixelShuffle(2) |
| 107 | |
| 108 | def forward(self, img0, img1, flow, c0, c1, flow_gt): |
| 109 | warped_img0 = warp(img0, flow) |