%% Set and Get Learning Rate Factor of Nested Layer Learnable Parameter
% Set and get the learning rate factor of a learnable parameter of a nested layer.
% Create a residual block layer using the custom layer residualBlockLayer attached to this example as a supporting file. To access this file, open this example as a Live Script.

inputSize = [224 224 64];
numFilters = 64;
layer = residualBlockLayer(inputSize,numFilters)

% View the layers of the nested network.

layer.Network.Layers

% Set the learning rate factor of the learnable parameter 'Weights' of the layer 'conv1' to 2 using the setLearnRateFactor function.

factor = 2;
layer = setLearnRateFactor(layer,'Network/conv1/Weights',factor);

% Get the updated learning rate factor using the getLearnRateFactor function.

factor = getLearnRateFactor(layer,'Network/conv1/Weights')

% Copyright 2020 The MathWorks, Inc.