MCPcopy Create free account
hub / github.com/TorchSSL/TorchSSL / replace_inf_to_zero

Function replace_inf_to_zero

models/freematch_entropy/freematch_utils.py:18–20  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

16
17
18def replace_inf_to_zero(val):
19 val[val == float('inf')] = 0.0
20 return val
21
22
23

Callers 1

entropy_lossFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected