MCPcopy Create free account
hub / github.com/SooLab/CGFormer / forward

Method forward

model/layers.py:76–84  ·  view source on GitHub ↗
(self, in_1, in_2)

Source from the content-addressed store, hash-verified

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
86class DProjector(nn.Module):
87 def __init__(self, text_dim=512, in_dim=512, kernel_size=1):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected