How to transform non image data so that it will be able to train with Matlab CNN ?

2 views (last 30 days)
For example if I am having 10 non image data point and its 10 corresponding label. Each datapoint is a 4x12 matrix where the matrix element is some small non negative number (for example 1.32E-05 -2.74E-06 -6.65E-06 ).
What would be the appropriate way to transform these input so that I could work with Matlab CNN ?
Also, what kind of input layer should be use for this task ?
Should I turn them into gray scale image or not ?

Answers (1)

Uday Pradhan
Uday Pradhan on 7 Sep 2020
Edited: Uday Pradhan on 7 Sep 2020
Hi Tuong,
You can use the "imageInputLayer" to input your data points into your neural network. You can take:
inputSize = [4 12 1]; %for a single data - point, you may use more than 1 channels to stack input data
layer = imageInputLayer(inputSize,'Normalization','rescale-zero-one');
This will normalize the elements of each data - point to be in the interval [0,1]. Try this normalization and see the results, if not then you can try other normalization options as well. Please refer to this link to know more.
Hope this helps!

Tags

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!