Maximum learning rate for linear layer
lr = maxlinlr(P)
lr = maxlinlr(P,'bias')
maxlinlr
is used to calculate learning rates for
linearlayer
.
lr = maxlinlr(P)
takes one argument,
P |
|
and returns the maximum learning rate for a linear layer without a bias that is to be
trained only on the vectors in P
.
lr = maxlinlr(P,'bias')
returns the maximum learning rate for a linear
layer with a bias.
Here you define a batch of four two-element input vectors and find the maximum learning rate for a linear layer with a bias.
P = [1 2 -4 7; 0.1 3 10 6]; lr = maxlinlr(P,'bias')