From 59490d9da93f28283c79d44a5e7c791cbd623b24 Mon Sep 17 00:00:00 2001
From: Francois Fleuret <francois@fleuret.org>
Date: Sat, 14 Jan 2017 18:09:39 +0100
Subject: [PATCH] Replaced torch.abs with math.abs.

---
 test-dagnn.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
 
-- 
2.39.5