Fixed swish/mish on CPU

This commit is contained in:
AlexeyAB 2019-12-24 04:30:22 +03:00
parent f81033266e
commit 719180e7f1
1 changed files with 5 additions and 2 deletions

View File

@ -515,10 +515,13 @@ convolutional_layer make_convolutional_layer(int batch, int steps, int h, int w,
l.x = (float*)calloc(total_batch * l.outputs, sizeof(float));
l.x_norm = (float*)calloc(total_batch * l.outputs, sizeof(float));
}
if (l.activation == SWISH || l.activation == MISH) l.activation_input = (float*)calloc(total_batch*l.outputs, sizeof(float));
#endif // not GPU
}
#ifndef GPU
if (l.activation == SWISH || l.activation == MISH) l.activation_input = (float*)calloc(total_batch*l.outputs, sizeof(float));
#endif // not GPU
if(adam){
l.adam = 1;
l.m = (float*)calloc(l.nweights, sizeof(float));