Skip to content

Commit

Permalink
Allocate activations on the stack
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit cf01416ebb7bdd9e64719e84cac8fb74abd1a7b8
Merge: 2363c1b 3a139b9
Author: Steven Atkinson <[email protected]>
Date:   Sat Apr 8 22:16:52 2023 -0700

    Merge branch 'main' into mleak

commit 2363c1b3aa96dad4e04b8c4468fd41f2bba73592
Author: Steven Atkinson <[email protected]>
Date:   Sat Apr 8 22:15:31 2023 -0700

    Allocate activations on the stack

commit 7288f0dea764e264f41424dd48399a06f5e908ea
Merge: 482b69a 8d956a2
Author: Steven Atkinson <[email protected]>
Date:   Sat Apr 8 19:02:11 2023 -0700

    Merge branch 'main' into activation_refactor

commit 482b69a
Author: Mike Oliphant <[email protected]>
Date:   Tue Apr 4 07:50:06 2023 -0700

    No need for middleCols() in full matrix apply anymore

commit b41d172
Author: Mike Oliphant <[email protected]>
Date:   Mon Apr 3 17:01:52 2023 -0700

    Fixed WaveNet sigmoid

commit 26a725d
Author: Mike Oliphant <[email protected]>
Date:   Mon Apr 3 16:36:34 2023 -0700

    Use new activation code for WaveNet Sigmoid

commit 74b0a49
Author: Mike Oliphant <[email protected]>
Date:   Mon Apr 3 16:32:15 2023 -0700

    Simplify Activation apply

commit 1cf8a4f
Author: Mike Oliphant <[email protected]>
Date:   Mon Apr 3 14:47:31 2023 -0700

    Move static function implementations into .cpp

commit a3f3ce7
Author: Mike Oliphant <[email protected]>
Date:   Mon Apr 3 14:29:33 2023 -0700

    More switching to new activation implementaion

commit 069679d
Author: Mike Oliphant <[email protected]>
Date:   Mon Apr 3 13:57:52 2023 -0700

    Fixed apply overrides

commit 2aa7020
Author: Mike Oliphant <[email protected]>
Date:   Mon Apr 3 13:35:00 2023 -0700

    Remove #pragma

commit 14cb71e
Author: Mike Oliphant <[email protected]>
Date:   Mon Apr 3 13:34:12 2023 -0700

    Begin to refactor activation function handling
  • Loading branch information
sdatkinson committed Apr 9, 2023
1 parent 3a139b9 commit aa777b5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions NAM/activations.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#include "activations.h"

activations::ActivationTanh _TANH = activations::ActivationTanh();
activations::ActivationFastTanh _FAST_TANH = activations::ActivationFastTanh();
activations::ActivationHardTanh _HARD_TANH = activations::ActivationHardTanh();
activations::ActivationReLU _RELU = activations::ActivationReLU();
activations::ActivationSigmoid _SIGMOID = activations::ActivationSigmoid();

std::unordered_map<std::string, activations::Activation*> activations::Activation::_activations = {
{"Tanh", new activations::ActivationTanh()},
{"Hardtanh", new activations::ActivationHardTanh()},
{"Fasttanh", new activations::ActivationFastTanh()},
{"ReLU", new activations::ActivationReLU()},
{"Sigmoid", new activations::ActivationSigmoid()}};
{"Tanh", &_TANH},
{"Hardtanh", &_HARD_TANH},
{"Fasttanh", &_FAST_TANH},
{"ReLU", &_RELU},
{"Sigmoid", &_SIGMOID}};

activations::Activation* tanh_bak = nullptr;

Expand Down

0 comments on commit aa777b5

Please sign in to comment.