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

Method _reduce

src/patchcore/common.py:131–135  ·  view source on GitHub ↗
(features)

Source from the content-addressed store, hash-verified

129class AverageMerger(_BaseMerger):
130 @staticmethod
131 def _reduce(features):
132 # NxCxWxH -> NxC
133 return features.reshape([features.shape[0], features.shape[1], -1]).mean(
134 axis=-1
135 )
136
137
138class ConcatMerger(_BaseMerger):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected