0
$\begingroup$

I am making a NN library without any other external NN lib and is implementing the Flatten layer. I know the forward implementation of flatten layer but is the backward just reshaping it or not? If yes is it I can just call a simple numpy reshape function to reshape it?

$\endgroup$
0
$\begingroup$

Yes, a simple reshape would do the trick. A flattening layer is just a tool for reshaping data/activations to make them compatible with other layers/functions. The flattening layer doesn't change the activations themselves, so there is no special backpropagation handling needed other than changing back the shape.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.