Effacer les filtres
Effacer les filtres

classify large data deep learning out of memory

4 vues (au cours des 30 derniers jours)
michael scheinfeild
michael scheinfeild le 25 Jan 2021
hi i have many movies as in example
it run out of memory for me
so i did few steps
1) save each video feature + label in mat files in two folders train and validation
1.mat
{[1024×92 single] [chew]}
2.mat
{[1024×80 single] [run]}
2) define datastore
TrainStore = fileDatastore(trainFolder,'ReadFcn',@load,'FileExtensions','.mat');
ValidationStore = fileDatastore(validationFolder,'ReadFcn',@load,'FileExtensions','.mat');
so for example
data1 = read(ValidationStore);
result in :
sequences: {[1024×122 single] [talk]}
3) define options :
options = trainingOptions('adam', ...
'MiniBatchSize',miniBatchSize, ...
'InitialLearnRate',1e-4, ...
'GradientThreshold',2, ...
'Shuffle','every-epoch', ...
'ValidationData',ValidationStore, ...
'ValidationFrequency',numIterationsPerEpoch, ...
'Plots','training-progress', ...
'Verbose',false);
get Error using trainingOptions (line 288)
The value of 'ValidationData' is invalid. The datastore used for 'ValidationData' must return a 2-column table or an M-by-2 cell array.
4) try to train
[netLSTM,info] = trainNetwork(TrainStore,layers,options);
dont work works
Error using trainNetwork (line 170)
Invalid training data. Responses must be nonempty.
documentation :
net = trainNetwork(ds,layers,options) trains a network using the datastore ds. For networks with multiple inputs, use this syntax with a combined or transformed datastore.
so probably issue of validation ...
TrainStore
TrainStore =
FileDatastore with properties:
Files: {
' ...\MLCODE\PROJECTS\DL\ClassifyPython\VideoClassify\Train\10.mat';
' ...\MLCODE\PROJECTS\DL\ClassifyPython\VideoClassify\Train\11.mat';
' ...\MLCODE\PROJECTS\DL\ClassifyPython\VideoClassify\Train\12.mat'
  1 commentaire
michael scheinfeild
michael scheinfeild le 25 Jan 2021
so i need help in define store for this files

Connectez-vous pour commenter.

Réponse acceptée

michael scheinfeild
michael scheinfeild le 1 Fév 2021

Plus de réponses (0)

Catégories

En savoir plus sur Image Data Workflows 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!

Translated by