classify large data deep learning out of memory

조회 수: 3 (최근 30일)
michael scheinfeild
michael scheinfeild 2021년 1월 25일
답변: michael scheinfeild 2021년 2월 1일
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'

채택된 답변

michael scheinfeild
michael scheinfeild 2021년 2월 1일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by