When using Mul2D layer there is compile error in running nn:mul2d function. I am using C++17, with ESP32. Problem is occuring either when creating layer with inplace option or without. Tried to comment if constexpr statement but it didn't help.
no matching function for call to 'mul2d<true>(dl::Tensor<short int>&, dl::Tensor<short int>&, dl::Tensor<short int>&, const dl::Activation<short int>*&, const std::vector<int>&)'
I will edit this issue if I found cause of this bug.
EDIT:
Solution:
I compared Mul2D to Add2D layer and found solution. There is wrong use of
nn::mul2d<true>(*this->output, input0, input1, this->activation, assign_core);
Instead you should write
nn::mul2d(*this->output, input0, input1, this->activation, assign_core, this->output_exponent);
or
nn::mul2d<true>(this->output_exponent, input0, input1, this->activation, assign_core);
Thank you for your feedback, we will fix the bugs soon.
nn::mul2d<true>(this->output_exponent, input0, input1, this->activation, assign_core);
this function will malloc the output tensor, and return it. so this approach is slower
When using Mul2D layer there is compile error in running nn:mul2d function. I am using C++17, with ESP32. Problem is occuring either when creating layer with
inplace
option or without. Tried to commentif constexpr
statement but it didn't help.I will edit this issue if I found cause of this bug.
EDIT: Solution: I compared Mul2D to Add2D layer and found solution. There is wrong use of
nn::mul2d<true>(*this->output, input0, input1, this->activation, assign_core);
Instead you should write
nn::mul2d(*this->output, input0, input1, this->activation, assign_core, this->output_exponent);
ornn::mul2d<true>(this->output_exponent, input0, input1, this->activation, assign_core);
but the second approach seems to be slower