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

7 ビュー (過去 30 日間)
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

回答 (1 件)

yanqi liu
yanqi liu 2022 年 1 月 17 日
yes,sir,may be
save trainedNet5.mat trainedNet5 rxTrainFrames
then use
load trainedNet5.mat
to get it
  2 件のコメント
john karli
john karli 2022 年 1 月 17 日
when i load load trainedNet5.mat then rxTrainFrames is not showingi n workspace and i got the error that rxTrainFrames is not define.
yanqi liu
yanqi liu 2022 年 1 月 17 日
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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with Statistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by