Browse files

Use Mathz SNAPSHOT for softmax function

  • Loading branch information...
1 parent 4bbdab0 commit 4ae1f568f7c02a0d3d0a46e84f30189a77f5aa26 @mikera committed Oct 27, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −1 pom.xml
  2. +6 −0 src/main/java/mikera/util/Arrays.java
View
2 pom.xml
@@ -108,7 +108,7 @@
<dependency>
<groupId>net.mikera</groupId>
<artifactId>mathz</artifactId>
- <version>0.0.1</version>
+ <version>0.0.2-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
View
6 src/main/java/mikera/util/Arrays.java
@@ -439,6 +439,12 @@ public static void applySigmoid(double[] data, int offset, int length) {
}
}
+ public static void applySoftplus(double[] data, int offset, int length) {
+ for (int i=offset; i<(offset+length); i++) {
+ data[i]=Maths.softplus(data[i]);
+ }
+ }
+
public static void applySigmoid(float[] data, int offset, int length, float gain) {
for (int i=offset; i<(offset+length); i++) {
data[i]=Maths.sigmoid(data[i]*gain);

0 comments on commit 4ae1f56

Please sign in to comment.