Hi Raffaele,
I understand that you are trying to pass a concatenation of cell arrays as the input. The error you encountered is because the input data is not in the proper format for multiple input neural networks.
To train a multiple-input network, you need to use a single data store that combines both sets of input data. You can achieve this by custom data handling using the “arrayDataStore” function in MATLAB.
Please refer to the following documentation for more information about the “arrayDataStore” function:
Here is a reference code for more clarification:
cds = arrayDatastore([trainImages1,trainImages2,trainLabels]);
This line would create an “arrayDatastore” containing 112 rows and 3 columns. After executing this, you could pass the “cds” variable directly to the “trainNetwork” function as below:
convnet = trainNetwork(cds,lgraph,options);
Please refer to the below documentation to know more about the “trainNetwork” function:
I hope it helps,
Regards,
Avadhoot.