(self, in_1, in_2)
| 74 | ) |
| 75 | |
| 76 | def forward(self, in_1, in_2): |
| 77 | if in_1.shape[-1] < in_2.shape[-1]: |
| 78 | in_1 = F.interpolate(in_1, size=in_2.shape[-2:], mode='bilinear', align_corners=True) |
| 79 | elif in_1.shape[-1] > in_2.shape[-1]: |
| 80 | in_2 = F.interpolate(in_2, size=in_1.shape[-2:], mode='bilinear', align_corners=True) |
| 81 | |
| 82 | x = torch.cat((in_1, in_2), dim=1) |
| 83 | x = self.fusion(x) |
| 84 | return x |
| 85 | |
| 86 | class DProjector(nn.Module): |
| 87 | def __init__(self, text_dim=512, in_dim=512, kernel_size=1): |
nothing calls this directly
no outgoing calls
no test coverage detected