MCPcopy Index your code
hub / github.com/DeepGraphLearning/DiffPack / score_norm

Method score_norm

diffpack/schedule.py:90–96  ·  view source on GitHub ↗
(self, sigma)

Source from the content-addressed store, hash-verified

88 return self.p_[sigma, x]
89
90 def score_norm(self, sigma):
91 if type(sigma) == torch.Tensor:
92 sigma = sigma.cpu().numpy()
93 sigma = np.log(sigma / self.PI)
94 sigma = (sigma - np.log(self.SIGMA_MIN)) / (np.log(self.SIGMA_MAX) - np.log(self.SIGMA_MIN)) * self.SIGMA_N
95 sigma = np.round(np.clip(sigma, 0, self.SIGMA_N)).astype(int)
96 return self.score_norm_[sigma]
97
98 # def score_norm_torch(self, sigma):
99 # sigma = torch.log(sigma / self.PI)

Callers 1

predictMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected