Feature request: multi-dimensional feature input layer for dlNetwork
조회 수: 1 (최근 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!