Custom flattenLayer compatible with imageInputLayer
Show older comments
I have been reading through some papers as part of research for my BSc major project, and came across this paper https://www.ijeat.org/wp-content/uploads/papers/v8i6/F8602088619.pdf outlining a hybrid LSTM-CNN architecture. While not the main subject of my project, I am curious about implementing the basic diagram that they have listed.
The architecture is simple enough: image input, batch normalization, lstm, convolution, max pool, fully connected, output.
Obviously a flatten layer is needed between batch norm and lstm, however the flatten layer provided in matlab is not compatible with image input layers (both 2D and 3D).
Reading the Flatten.m source file, the comments list the basic details of image dimensions, however the FlattenLayer.m (class) and flattenLayer.m (function), only list sequence data dimensions in their comments.
This makes me wonder if it is at all possible to make a custom flatten layer that is compatible with image input.
Accepted Answer
More Answers (1)
Dan
on 8 Sep 2022
0 votes
same ask. it will be very beneficial from compatability with other frameworks
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!