Warning: Variable 'rxTrainFrames' was not saved. For variables larger than 2GB use MAT-file version 7.3 or later

37 views (last 30 days)
john karli
john karli on 16 Jan 2022
Commented: yanqi liu on 17 Jan 2022
How do i keep the rxTrainFrame into workspace? my code is
dataDirectory = 'E:\SNR-Dataset\Data-18-time'
frameDS = signalDatastore(dataDirectory,'SignalVariableNames',["frame","label"],'IncludeSubfolders',true,'FileExtensions','.mat');
frameDSTrans = transform(frameDS,@helperModClassIQAsPages);
splitPercentages = [percentTrainingSamples,percentValidationSamples,percentTestSamples];
[trainDSTrans,validDSTrans,testDSTrans] = helperModClassSplitData(frameDSTrans,splitPercentages);
% Gather the training and validation frames into the memory
trainFramesTall = tall(transform(trainDSTrans, @helperModClassReadFrame));
rxTrainFrames = gather(trainFramesTall);
rxTrainFrames = cat(4, rxTrainFrames{:});
save('rxTrainFrames.mat', 'rxTrainFrames', '-v7.3')
validFramesTall = tall(transform(validDSTrans, @helperModClassReadFrame));
rxValidFrames = gather(validFramesTall);
rxValidFrames = cat(4, rxValidFrames{:});
% Gather the training and validation labels into the memory
trainLabelsTall = tall(transform(trainDSTrans, @helperModClassReadLabel));
rxTrainLabels = gather(trainLabelsTall);
rxTrainLabels = removecats(rxTrainLabels);
validLabelsTall = tall(transform(validDSTrans, @helperModClassReadLabel));
rxValidLabels = gather(validLabelsTall);
rxValidLabels = removecats(rxValidLabels);
maxEpochs = 100;
miniBatchSize = 128;
options = helperModClassTrainingOptions(maxEpochs,miniBatchSize,...
numel(rxTrainLabels),rxValidFrames,rxValidLabels);
trainedNet5 = trainNetwork(rxTrainFrames,rxTrainLabels,trainedNet4 ,options);
save trainedNet5

Answers (1)

yanqi liu
yanqi liu on 17 Jan 2022
yes,sir,may be
save trainedNet5.mat trainedNet5 rxTrainFrames
then use
load trainedNet5.mat
to get it
  2 Comments
yanqi liu
yanqi liu on 17 Jan 2022
yes,sir,may be use
save trainedNet5.mat trainedNet5 rxTrainFrames
to get file “trainedNet5.mat”
then,use
clear all;
load trainedNet5.mat
rxTrainFrames
check the rxTrainFrames

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by