MCPcopy Create free account
hub / github.com/DanielShalam/BPA / loop

Method loop

methods/pt_map/pt_map_loss.py:104–109  ·  view source on GitHub ↗
(self, X: torch.Tensor, model: GaussianModel, n_epochs: int = 20)

Source from the content-addressed store, hash-verified

102 model.update_from_estimate(m_estimates, self.alpha)
103
104 def loop(self, X: torch.Tensor, model: GaussianModel, n_epochs: int = 20):
105 for epoch in range(1, n_epochs + 1):
106 self.perform_epoch(model=model, X=X)
107 # get final accuracy and return it
108 P = model.get_probas(X=X, labels=self.s_labels)
109 return P
110
111
112class PTMAPLoss(nn.Module):

Callers 1

forwardMethod · 0.95

Calls 2

perform_epochMethod · 0.95
get_probasMethod · 0.80

Tested by

no test coverage detected