style
This commit is contained in:
parent
2723c9ee04
commit
836e3872b6
@ -9,12 +9,8 @@ tracker(x::TrackedReal) = x.tracker
|
|||||||
track(f::Call, x::Real) = TrackedReal(Tracked(f, x, zero(x)))
|
track(f::Call, x::Real) = TrackedReal(Tracked(f, x, zero(x)))
|
||||||
|
|
||||||
function back!(x::TrackedReal)
|
function back!(x::TrackedReal)
|
||||||
if isinf(x)
|
isinf(x) && error("Loss is Inf")
|
||||||
error("Loss is Inf")
|
isnan(x) && error("Loss is NaN")
|
||||||
end
|
|
||||||
if isnan(x)
|
|
||||||
error("Loss is NaN")
|
|
||||||
end
|
|
||||||
return back!(x, 1)
|
return back!(x, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user