Author: tommaso
Date: Tue Jun 18 12:18:13 2013
New Revision: 1494109

URL: http://svn.apache.org/r1494109
Log:
added tanh function

Added:
    labs/yay/trunk/core/src/main/java/org/apache/yay/core/TanhFunction.java   
(with props)

Added: labs/yay/trunk/core/src/main/java/org/apache/yay/core/TanhFunction.java
URL: 
http://svn.apache.org/viewvc/labs/yay/trunk/core/src/main/java/org/apache/yay/core/TanhFunction.java?rev=1494109&view=auto
==============================================================================
--- labs/yay/trunk/core/src/main/java/org/apache/yay/core/TanhFunction.java 
(added)
+++ labs/yay/trunk/core/src/main/java/org/apache/yay/core/TanhFunction.java Tue 
Jun 18 12:18:13 2013
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yay.core;
+
+import org.apache.yay.ActivationFunction;
+
+/**
+ * Tanh activation function
+ */
+public class TanhFunction implements ActivationFunction<Double> {
+    @Override
+    public Double apply(Double signal) {
+        return Math.tanh(signal);
+    }
+}

Propchange: 
labs/yay/trunk/core/src/main/java/org/apache/yay/core/TanhFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to