HOw to fix an Error in deep network configuration with images data sets
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have two correlated images data sets, I am trying to feed each dataset into (input1) and (input2) in a netwrok named (TestNet). Iused imagedatastore twice to load the two data sets as following:
imds1 = imageDatastore (Path of data1, 'Includesubfolder', true, 'Labelsource', 'foldername');
imds2 = imageDatastore (Path of data2, 'Includesubfolder', true, 'Labelsource', 'foldername');
imds1.ReadFcn = @ (readDatastoreImage) readAndProcessImage (readDatastoreImage);
imds2.ReadFcn = @ (readDatastoreImage) readAndProcessImage (readDatastoreImage);
[Train1, Test1] = splitEachLabel (imds1, 0.7, 'randomize');
[Train2, Test2] = splitEachLabel (imds2, 0.7, 'randomize');
imds = {Train1; Train2}; % I found this in one of the questions/answers in mathwork (Trying to feed the network with the two inputs, one to layer 1 and 2nd to the layer 2)
Layers = [Inputlayer [28 28 3]
Conv1
maxpool1
Conv2
FC (10)
Softmax
Classification]
TestNet = network (2,7); % Define a custom network with 2 inputs and 7 layers.
TestNet.Inputconnect (1,1) = 1; % Trying to connect input 1 with layer 1
TestNet.Inputconnect (2,1) = 1; % Trying to connect input 2 with layer 2 (Is this right?)
TestNet = configure (TestNet, imds);
TestNet = trainNetwork (imds, Layers, options);
After Run, there is an error says Input data {1,1} is not numeric or logical / error using network/configure.
wish to hear from you genius
0 comentarios
Respuestas (1)
Bernhard Suhm
el 12 de Dic. de 2017
Currently, (deep) networks with multiple inputs are not supported in our framework, but we are working on that enhancement.
Also, your code is using some functions that are only defined for "shallow" networks (‘network’ and ‘configure’). The 'configure' function expects the training data in a matrix of observations and features, and cannot process an image data store.
0 comentarios
Ver también
Categorías
Más información sobre Image Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!