trainNetwork in MATLAB after several iterations gives error: Array dimensions being concatenated are inconsistent?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Meret Ackermann
le 8 Avr 2021
Commenté : Meret Ackermann
le 11 Mai 2021
I am currently working on several CNNs for regression. After several iterations (btw 1500-3000 something) of training a similar architecture as V-net by Miletari et.al and a less deep multi-input CNN architecture the training stops due to the error below.
Error using trainNetwork
Dimensions of arrays being concatenated are not consistent.
Error in net
[net,info] = trainNetwork(ds,lgraph,options);
Caused by:
Error using cat
Dimensions of arrays being concatenated are not consistent
The function
analyzeNetwork(lgraph)
shows no warnings or errors.
Did anyone experience the same issue and could tackle the reason for the issue?
0 commentaires
Réponse acceptée
Srivardhan Gadila
le 14 Avr 2021
As per my knowledge, when using datastores and batchSize greater than 1 all the training samples should be of same size. The trainNetwork function combines multiple training samples of batchSize together and gives it to the network. If the those samples are not having the same size then you will be getting the above mentioned error.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Recognition, Object Detection, and Semantic Segmentation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!