denizyuret / AutoGrad.jl

Julia port of the Python autograd package.
Other
169 stars 26 forks source link

x.^2 compared with x .* x #41

Closed xukai92 closed 6 years ago

xukai92 commented 6 years ago

I tried two implementation of MSE:

MSE(x, x̂) = mean(sum((x - x̂) .* (x - x̂), 1))

and

MSE(x, x̂) = mean(sum((x - x̂).^2, 1))

, where the latter one can give me NaN in the same program but the first one works fine. Any idea why this happens?

denizyuret commented 6 years ago

This is a problem with the NVIDIA libraries: https://github.com/denizyuret/Knet.jl/issues/108

On Fri, Dec 29, 2017 at 8:54 PM Kai Xu notifications@github.com wrote:

I tried two implementation of MSE:

MSE(x, x̂) = mean(sum((x - x̂) .* (x - x̂), 1))

and

MSE(x, x̂) = mean(sum((x - x̂).^2, 1))

, where the latter one can give me NaN in the same program but the first one works fine. Any idea why this happens?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/denizyuret/AutoGrad.jl/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvNppOMaYlyhQ3W4ZYqkc-xyTxaoY1oks5tFSdngaJpZM4RPSGC .

xukai92 commented 6 years ago

I see. Thx!