From 0962620dfc7b56ec7f5c423a2e3bb9c8dc4493c2 Mon Sep 17 00:00:00 2001 From: jvech Date: Sat, 12 Aug 2023 07:51:21 -0500 Subject: add: softplus activation added --- .gitignore | 4 ++++ commands.gdb | 4 ++-- src/activations.c | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 395053b..77acd01 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ data/ tags ml objs/ +doc/* +!doc/*.pdf +!doc/*.tex +*.gdb diff --git a/commands.gdb b/commands.gdb index 9161580..9265e9a 100644 --- a/commands.gdb +++ b/commands.gdb @@ -1,4 +1,4 @@ -break nn.c:68 +break nn.c:35 commands - p *net_out@labels_shape[1]*labels_shape[0] + printf "(%zu x %zu)", out_shape[0], out_shape[1]; end diff --git a/src/activations.c b/src/activations.c index 011734d..e2704ee 100644 --- a/src/activations.c +++ b/src/activations.c @@ -14,6 +14,11 @@ struct Activation NN_LEAKY_RELU = { .dfunc = dleaky_relu }; +struct Activation NN_SOFTPLUS = { + .func = softplus, + .dfunc = dsoftplus +}; + struct Activation NN_RELU = { .func = relu, .dfunc = drelu -- cgit v1.2.3-70-g09d2