MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / __init__

Method __init__

tools/test_linear_probing_hf.py:176–179  ·  view source on GitHub ↗
(self, classifiers_dict: Dict[str, nn.Module])

Source from the content-addressed store, hash-verified

174 """Container for multiple linear classifiers."""
175
176 def __init__(self, classifiers_dict: Dict[str, nn.Module]):
177 super().__init__()
178 self.classifiers_dict = nn.ModuleDict()
179 self.classifiers_dict.update(classifiers_dict)
180
181 def forward(self, inputs) -> Dict[str, torch.Tensor]:
182 return {k: v.forward(inputs) for k, v in self.classifiers_dict.items()}

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected