MCPcopy Create free account
hub / github.com/amazon-science/patchcore-inspection / forward

Method forward

src/patchcore/common.py:168–170  ·  view source on GitHub ↗
(self, features)

Source from the content-addressed store, hash-verified

166 self.preprocessing_dim = preprocessing_dim
167
168 def forward(self, features):
169 features = features.reshape(len(features), 1, -1)
170 return F.adaptive_avg_pool1d(features, self.preprocessing_dim).squeeze(1)
171
172
173class Aggregator(torch.nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected