(self, in_planes, c=64)
| 19 | |
| 20 | class IFBlock(nn.Module): |
| 21 | def __init__(self, in_planes, c=64): |
| 22 | super(IFBlock, self).__init__() |
| 23 | self.conv0 = nn.Sequential( |
| 24 | conv(in_planes, c//2, 3, 1, 1), |
| 25 | conv(c//2, c, 3, 2, 1), |
| 26 | ) |
| 27 | self.convblock = nn.Sequential( |
| 28 | conv(c, c), |
| 29 | conv(c, c), |
| 30 | conv(c, c), |
| 31 | conv(c, c), |
| 32 | conv(c, c), |
| 33 | conv(c, c), |
| 34 | conv(c, c), |
| 35 | conv(c, c), |
| 36 | ) |
| 37 | self.lastconv = nn.ConvTranspose2d(c, 5, 4, 2, 1) |
| 38 | |
| 39 | def forward(self, x, flow, scale): |
| 40 | if scale != 1: |