Closed JJMorton closed 3 years ago
torch.nan_to_num replaces infinities in a and b with finite values, making their multiplication with little_phi (which is zero for this case) correctly return zero in the calculation of self._lpbb_m_lpaa_d_Z
torch.nan_to_num
a
b
little_phi
self._lpbb_m_lpaa_d_Z
Thanks!
torch.nan_to_num
replaces infinities ina
andb
with finite values, making their multiplication withlittle_phi
(which is zero for this case) correctly return zero in the calculation ofself._lpbb_m_lpaa_d_Z