MCPcopy Create free account
hub / github.com/LAMDA-CL/CVPR22-Fact / encode

Method encode

models/base/Network.py:42–46  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

40 return x
41
42 def encode(self, x):
43 x = self.encoder(x)
44 x = F.adaptive_avg_pool2d(x, 1)
45 x = x.squeeze(-1).squeeze(-1)
46 return x
47
48 def forward(self, input):
49 if self.mode != 'encoder':

Callers 3

forward_metricMethod · 0.95
forwardMethod · 0.95
update_fcMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected