Table error when using an augmented and transformed datastore for training a neural network?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I have created an augmented datastore with a number of randomized augmentaitons. I would like to add a custom augmentation (randomized histogram scaling) so I created a tranformed datastore. I then combiend these and attempted to use the combined datastore to train a neural network. I get the error below. Please advise. Thanks!
Error using trainNetwork (line 184)
All input arguments must be tables.
Error in TrainNetworks (line 8)
net2 = trainNetwork(imds2,layers{1},options{1});
Caused by:
Error using matlab.io.datastore.CombinedDatastore/read (line 144)
All input arguments must be tables.
imageAugmenter = imageDataAugmenter( ...
'RandRotation',[-15,15], ... %+/- 15 degrees rotation
'RandScale',[.95 1.05], ... %randomlys cale image up or down 5 percent
'RandXShear',[0 5], ... %randomly apply up to 5% shear
'RandYShear',[0 5], ... %randomly apply up to 5% shear
'RandXTranslation',[-80 80], ... %randomly translate 30 pixels
'RandYTranslation',[-60 60]); %randomly translate 30 pixels
auimds=augmentedImageDatastore(imageSize,imds,'DataAugmentation',imageAugmenter);
dsnew=transform(imds,@(x) transformhist(x));
imds2=combine(dsnew,auimds);
net = trainNetwork(imds2,layers{1},options{1});
0 Kommentare
Antworten (1)
Dheeraj
am 5 Sep. 2023
Hi,
I understand you’re trying to combine two data stores to have a single combinedDataStore to pass as the argument to the “trainNetwork” function and the first argument in “trainNetwork” can be of a numeric array, table or a datastore data types. The second argument can be of type Layer Array or LayerGraph object. So, the problem might be with how you’re passing the data to the trainNetwork. You could share your complete code in case this does not solve your query.
You could refer to this MATLAB documentation https://in.mathworks.com/help/deeplearning/ref/trainnetwork.html#responsive_offcanvas to have a better understanding about trainNetwork.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Custom Training Loops 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!