| 88 | |
| 89 | class BasicMotionEncoder(nn.Module): |
| 90 | def __init__(self, args): |
| 91 | super(BasicMotionEncoder, self).__init__() |
| 92 | cor_planes = args.corr_levels * (2*args.corr_radius + 1)**2 |
| 93 | self.convc1 = nn.Conv2d(cor_planes, 256, 1, padding=0) |
| 94 | self.convc2 = nn.Conv2d(256, 192, 3, padding=1) |
| 95 | self.convf1 = nn.Conv2d(2, 128, 7, padding=3) |
| 96 | self.convf2 = nn.Conv2d(128, 64, 3, padding=1) |
| 97 | self.conv = nn.Conv2d(64+192, 128-2, 3, padding=1) |
| 98 | |
| 99 | def forward(self, flow, corr): |
| 100 | cor = F.relu(self.convc1(corr)) |