Error in validation datastore while I am training in parallel
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to train deep learning network on FaceForensics data set,
I use spliteachLabel to divide the data into 2 sets one for training and one for validation,
when I train in my cpu I didn't get any error ,
but when I trained in parallel I get the following error:
Error using trainNetwork (line 184)
Dot indexing is not supported for variables of this type.
Error in mylayers3D (line 137)
[lgraph,trainInfo] = trainNetwork(imds,lgraph,optionsadam);
Caused by:
Error using nnet.internal.cnn.ParallelTrainer/train (line 96)
Error detected on worker 1.
Error using nnet.internal.cnn.util/ValidationStatelessPredictStrategy/predictAndComputeLoss (line 136)
Dot indexing is not supported for variables of this type.
below the split code
imds = imageDatastore(datasetLocation,'IncludeSubfolders',true,'LabelSource','foldernames','FileExtensions',{'.jpg'});
[imdstraining, validdata]=splitEachLabel(imds, 0.6);
optionsadam = trainingOptions("adam",Plots="training-progress", verbose=1, ValidationFrequency=10,Epsilon=1e-8, MaxEpoch=200, MiniBatchSize=60, InitialLearnRate=0.0001, shuffle='every-epoch',ExecutionEnvironment="parallel",ValidationData=validdata);
any help to prevent this error ?
0 Commenti
Risposte (1)
Krishna
il 3 Ott 2023
Hello Roaa,
The error, “Dot indexing is not supported for variables of this type” occurs when you try to access or modify a property or element of a variable that does not support dot indexing.
Dot indexing is used to access properties or elements of an object or structure in MATLAB. However, not all variables in MATLAB support dot indexing. Please check if you are trying to access values from a non-struct datatype.
One of the reason can be the type and format of data you are passing to the trainnetwork is not correct, because of this the error occurs in nnet.internal.cnn.util/ValidationStatelessPredictStrategy/predictAndComputeLoss (line 136). Please check the data format before passing it in trainnetwork.
Also, for more information on how to train network using GPU and CPU effectively please go through this documentation: https://in.mathworks.com/help/deeplearning/ref/trainnetwork.html
0 Commenti
Vedere anche
Categorie
Scopri di più su Parallel and Cloud in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!