MCPcopy Create free account
hub / github.com/ICTMCG/FakeSV / forward

Method forward

code/models/FANVM.py:48–54  ·  view source on GitHub ↗
(self, input_thumb, input_L)

Source from the content-addressed store, hash-verified

46 self.linear2 = nn.Sequential(torch.nn.Linear(self.emb_dim, fea_dim),torch.nn.ReLU())
47
48 def forward(self, input_thumb, input_L):
49 input_ALL = torch.cat((input_L, input_thumb),1) #(bs,len+1,4096)
50 fea_A = torch.bmm(input_thumb,self.linear1(input_ALL).permute(0,2,1)) # (bs, 1, len+1)
51 fea_alpha = F.softmax(fea_A) # (bs, 1, len+1)
52 fea_V = torch.matmul(fea_alpha,input_ALL).squeeze() # (bs, 4096)
53 fea = self.linear2(fea_V)
54 return fea
55
56class ReverseLayerF(Function):
57 #@staticmethod

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected