'InitalLearnRate' is not an option for solver 'sgdm'.

47 views (last 30 days)
sai
sai on 3 Apr 2024 at 3:10
Commented: sai on 3 Apr 2024 at 4:09
options = trainingOptions('sgdm', ...
'MiniBatchSize',128, ...
'MaxEpochs',1, ...
'InitalLearnRate',1e-4);
I can not set InitalLearnRate
Error using nnet.cnn.TrainingOptionsSGDM (line 128)
'InitalLearnRate' is not an option for solver 'sgdm'.
Error in trainingOptions (line 440)
opts = nnet.cnn.TrainingOptionsSGDM(varargin{:});
Error in test3 (line 159)
options = trainingOptions('sgdm', ...
MATLAB version is R2023b
  1 Comment
KSSV
KSSV on 3 Apr 2024 at 3:31
options = trainingOptions('sgdm')
options =
TrainingOptionsSGDM with properties: Momentum: 0.9000 InitialLearnRate: 0.0100 MaxEpochs: 30 LearnRateSchedule: 'none' LearnRateDropFactor: 0.1000 LearnRateDropPeriod: 10 MiniBatchSize: 128 Shuffle: 'once' CheckpointFrequency: 1 CheckpointFrequencyUnit: 'epoch' SequenceLength: 'longest' PreprocessingEnvironment: 'serial' L2Regularization: 1.0000e-04 GradientThresholdMethod: 'l2norm' GradientThreshold: Inf Verbose: 1 VerboseFrequency: 50 ValidationData: [] ValidationFrequency: 50 ValidationPatience: Inf ObjectiveMetricName: 'loss' CheckpointPath: '' ExecutionEnvironment: 'auto' OutputFcn: [] Metrics: [] Plots: 'none' SequencePaddingValue: 0 SequencePaddingDirection: 'right' InputDataFormats: "auto" TargetDataFormats: "auto" ResetInputNormalization: 1 BatchNormalizationStatistics: 'auto' OutputNetwork: 'auto' Acceleration: "auto"
sgdm supports InitalLearnRate.

Sign in to comment.

Accepted Answer

VBBV
VBBV on 3 Apr 2024 at 3:50
      options = trainingOptions('sgdm', ...
        'MiniBatchSize',128, ...
        'MaxEpochs',1, ...
        'InitialLearnRate',1e-4);

There is a type error in the function

  2 Comments
VBBV
VBBV on 3 Apr 2024 at 3:51
Edited: VBBV on 3 Apr 2024 at 3:51

You have mistyped the spelling in the function. Check the spelling as InitalLearnRate there is a missing 'i'

sai
sai on 3 Apr 2024 at 4:09
Thank you, I solved the problem

Sign in to comment.

More Answers (0)

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!