MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / __init__

Method __init__

monai/networks/layers/vector_quantizer.py:207–212  ·  view source on GitHub ↗
(self, quantizer: EMAQuantizer)

Source from the content-addressed store, hash-verified

205 """
206
207 def __init__(self, quantizer: EMAQuantizer):
208 super().__init__()
209
210 self.quantizer: EMAQuantizer = quantizer
211
212 self.perplexity: torch.Tensor = torch.rand(1)
213
214 def forward(self, inputs: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]:
215 quantized, loss, encoding_indices = self.quantizer(inputs)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected