ImageInputLayer Error in deep learning toolbox
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MAHSA YOUSEFI
am 10 Dez. 2020
Kommentiert: Steven Pan
am 16 Aug. 2022
Hi there!
I would be thankful for any help. I faced with this error:
Error using dlnetwork (line 117)
Invalid network.
Caused by:
Layer 'input': Empty Mean property. For an image input layer with 'zerocenter' normalization, specify a nonempty value
for the Mean property.
I used following syntax of this page: https://nl.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.imageinputlayer.html
inputlayer = imageInputLayer([28 28 3],'Name','input')
Why in my case, it needs to determine the "Mean" while in that example the Mean=[] did not make a problem?
0 Kommentare
Akzeptierte Antwort
Srivardhan Gadila
am 18 Dez. 2020
In case of layerGraph based approach we use trainNetwork to train the network and this function takes the entire data for the training. In case imageInputLayer the Normalization used is 'zerocenter' by default and Mean is '[ ]' by default i.e., the software calculates the mean at training time on the complete data within the trainNetwork function.
In case of dlnetwork based approach we won't use the trainNetwork function and instead use custom training loops. In this case we pass minibatches (minibatchqueue) of the data during each iteration of custom training loop. Hence the mean is not automatically calculated here.
Fore more information refer to the documentation of imageInputLayer, imageInputLayer - Properties, dlnetwork, layerGraph & trainNetwork.
This issue is known to the concerned people and they may address it in future releases.
1 Kommentar
Steven Pan
am 16 Aug. 2022
Thank you for the answer, this is exactly what I am searching for. In this case, how can we calculate the mean or min or max before we see the data? Currently I can only assume min = 0 and max = 255, but this can't be guaranteed.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!