Skip to content

Commit

Permalink
fixed for dense input with dim=1
Browse files Browse the repository at this point in the history
  • Loading branch information
majianjia committed Dec 8, 2020
1 parent 65d32f9 commit 6fe5478
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/layers/nnom_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ nnom_layer_t *input_s(const nnom_io_config_t* config)
*/

// set parameters
if(config->tensor->num_dim == 2) // test for 1d input, expend h = 1
if(config->tensor->num_dim == 1) // test for 1d input, expend h = 1
layer->shape = shape(1, 1, config->tensor->dim[0]);
else if (config->tensor->num_dim == 2) // test for 1d input, expend h = 1
layer->shape = shape(1, config->tensor->dim[0], config->tensor->dim[1]);
else
layer->shape = shape(config->tensor->dim[0], config->tensor->dim[1], config->tensor->dim[2]);
Expand Down

0 comments on commit 6fe5478

Please sign in to comment.