Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ _safelog
Function
_safelog
imperative/python/megengine/functional/loss.py:329–331 ·
view source on GitHub ↗
(x: Tensor)
Source
from the content-addressed store, hash-verified
327
328
329
def
_safelog(x: Tensor) -> Tensor:
330
eps = np.finfo(x.dtype).tiny
331
return
log(maximum(x, eps))
332
333
334
def
ctc_loss(
Callers
1
ctc_loss
Function · 0.85
Calls
2
maximum
Function · 0.85
log
Function · 0.70
Tested by
no test coverage detected