From: Francois Fleuret Date: Sat, 14 Jan 2017 17:09:39 +0000 (+0100) Subject: Replaced torch.abs with math.abs. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=59490d9da93f28283c79d44a5e7c791cbd623b24;p=dagnn.git Replaced torch.abs with math.abs. --- diff --git a/test-dagnn.lua b/test-dagnn.lua index 9f343a9..5d8a309 100755 --- a/test-dagnn.lua +++ b/test-dagnn.lua @@ -57,7 +57,7 @@ function checkGrad(model, criterion, input, target) local num = (loss1 - loss0) / (2 * epsilon) if num ~= ana then - err = math.max(err, torch.abs(num - ana) / torch.abs(num)) + err = math.max(err, math.abs(num - ana) / math.abs(num)) end end