From 2370b373cdb78e4041334edabd2c019690ea5817 Mon Sep 17 00:00:00 2001 From: Henry-Chinner Date: Fri, 1 May 2015 01:31:05 +0400 Subject: [PATCH] Update math.py to include tanh elementwise op --- cudarray/nnet/math.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cudarray/nnet/math.py b/cudarray/nnet/math.py index f91bb61..9ad1dce 100644 --- a/cudarray/nnet/math.py +++ b/cudarray/nnet/math.py @@ -19,6 +19,8 @@ def sigmoid(x, out=None): def sigmoid_d(x, out=None): return unary(elementwise.sigmoid_d_op, x, out) +def tanh(x, out=None): + return unary(elementwise.tanh_op, x, out) def tanh_d(x, out=None): return unary(elementwise.tanh_d_op, x, out)