classify large data deep learning out of memory
    9 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    michael scheinfeild
      
 il 25 Gen 2021
  
    
    
    
    
    Risposto: michael scheinfeild
      
 il 1 Feb 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'
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Deep Learning Toolbox 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!