Azzera filtri
Azzera filtri

Matlab CNN toolbox, train network function, what is in the example training dataset?

1 visualizzazione (ultimi 30 giorni)
Hi, I'm trying to use the CNN toolbox's trainnetwork function described in this documentation http://www.mathworks.com/help/nnet/ref/trainnetwork.html
I would like to learn to use the function by creating a similar training & testing dataset compare to the one in this example: digitTrainSet, and digitTestSet. However, I can't seem to find info about the contents of these dataset
I tried the "whos -file digitTrainset" command then it shows that it contains
  1. TTrain: 5000*1 categorical class (I assume these are the answer of the picture being trained)
  2. XTrain 4-D double matrix
I'm confused about the 4D matrix as for what are the dimensions of stands for I'm assuming it is (H, W, C, X):
  • H = height
  • W = width
  • C = color channel, where 1 = grayscale , 3 = RGB coloredbut X I have no idea what it is, does it stands for which digit picture the other 3 dimension it is about?
-------- The reason I'm asking this question is I'm creating a similar training/testing dataset to train a network, but has fail and can't figure out why.. Please let me know if I did not describe my confusion clearly, thanks in advance...

Risposte (3)

danfeng liu
danfeng liu il 27 Mag 2016
I think the X is the number of the data.

Wei-Li Chang
Wei-Li Chang il 23 Set 2016
X is the total number of digits. such as 0:490,1:490...9,490, total number is 4940 .

Ellen Apolinar
Ellen Apolinar il 21 Feb 2017
Maybe this might answer the question more precisely even it's an old topic:
X — Images 4-D numeric array
Images, specified as a 4-D numeric array. The array is arranged so that the first three dimensions are the height, width, and channels, and the last dimension indexes the individual images.
Found in the documentation where the Input Arguments are listet: http://de.mathworks.com/help/nnet/ref/trainnetwork.html

Community Treasure Hunt

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

Start Hunting!

Translated by