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

Method fit

src/patchcore/patchcore.py:147–153  ·  view source on GitHub ↗

PatchCore training. This function computes the embeddings of the training data and fills the memory bank of SPADE.

(self, training_data)

Source from the content-addressed store, hash-verified

145 return _detach(features)
146
147 def fit(self, training_data):
148 """PatchCore training.
149
150 This function computes the embeddings of the training data and fills the
151 memory bank of SPADE.
152 """
153 self._fill_memory_bank(training_data)
154
155 def _fill_memory_bank(self, input_data):
156 """Computes and sets the support features for SPADE."""

Callers 1

_fill_memory_bankMethod · 0.45

Calls 1

_fill_memory_bankMethod · 0.95

Tested by

no test coverage detected