Feature request: multi-dimensional feature input layer for dlNetwork
4 次查看(过去 30 天)
显示 更早的评论
This is a feature request for deep network :
Why can't we input multidimensional input features in an inputFeatureLayer ? They are actually restricted to 1D (vector)..
There should not be any reason to flatten multidimensional arrays... It is not clear to me why the feature input layer has been restricted to 1D vector. It seems quite inconsistent. There are many applications where the data is not an image (i.e. there is no "channel") and we have 2D arrays or 3D arrays.
For instance, when using Reinforcement Learning (not necessarily with Mathwork's toolbox, we may want to use our own custom code), we may want to process states (2D arrays) that corresponds to a grid world or a 3D volume (stack of 2D state).
The only alternative is an imageInputLayer but it requires necessarily a chanel dimension, even for a 2D array. So basically, we endup with an additionnal unwanted dimension, that unecessarily requires to add the dimension to provide input data to the network and deal with squeezing (to remove, in some other part of the code, this needless additionnal channel dimension)
To me, it makes sense to have imageInputLayer for specific image specific treatement (if needed).
What are your thought about this ? Any info by Mathwork's development team?
0 个评论
回答(1 个)
Kausthub
2023-9-6
Hi Delprat Sebastien,
Yes, you could flatten the 2D/3D arrays into a vector and use featureInputLayer, but I agree that flattening could be cumbersome. I believe the requested feature to input multi-dimensional features to featureInputLayer is very much needed and would be beneficial for the community. Also, thank you for pointing out an alternative solution for this problem using imageInputLayer and its corresponding drawback.
Thank you.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!