trainNetwork in MATLAB after several iterations gives error: Array dimensions being concatenated are inconsistent?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Meret Ackermann
el 8 de Abr. de 2021
Comentada: Meret Ackermann
el 11 de Mayo de 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 comentarios
Respuesta aceptada
Srivardhan Gadila
el 14 de Abr. de 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.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!