File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,10 @@ keras::DataChunk* keras::LayerActivation::compute_output(keras::DataChunk* dc) {
214
214
for (unsigned int k = 0 ; k < y.size (); ++k) {
215
215
y[k] = 1 /(1 +exp (-y[k]));
216
216
}
217
+ } else if (m_activation_type == " tanh" ) {
218
+ for (unsigned int k = 0 ; k < y.size (); ++k) {
219
+ y[k] = tanh (y[k]);
220
+ }
217
221
} else {
218
222
keras::missing_activation_impl (m_activation_type);
219
223
}
Original file line number Diff line number Diff line change 3
3
echo ' Test for CNN dumping'
4
4
5
5
# Parameters
6
- INPUT_ARCH=" ../../keras2cpp_nets/th/52c55ce6-201b-4ce4-ad53-68b86d79804f.cnn.architecture .json"
7
- INPUT_WEIGHTS=" ../../keras2cpp_nets/th/52c55ce6-201b-4ce4-ad53-68b86d79804f.cnn.model .h5"
6
+ INPUT_ARCH=" example/my_nn_arch .json"
7
+ INPUT_WEIGHTS=" example/my_nn_weights .h5"
8
8
9
9
DUMPED_CNN=" test_cnn.dumped"
10
10
DATA_SAMPLE=" test_random_input.dat"
You can’t perform that action at this time.
0 commit comments