Unverified Commit 7c6cb563 authored by wawatt's avatar wawatt Committed by GitHub
Browse files

Update losses.py

parent 34463e65
......@@ -73,6 +73,7 @@ def clip_by_tensor(t, t_min, t_max):
:param t_min: min
:param t_max: max
:return: cliped tensor
code from https://blog.csdn.net/york1996/article/details/89434935
result = (t >= t_min).double() * t + (t < t_min).double() * t_min
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment