_get_lr
get_lr
¶
Get the learning rate of a given model
generated by fe.build
.
This method can be used with TensorFlow models:
m = fe.build(fe.architecture.tensorflow.LeNet, optimizer_fn="adam")
b = fe.backend.get_lr(model=m) # 0.001
This method can be used with PyTorch models:
m = fe.build(fe.architecture.pytorch.LeNet, optimizer_fn="adam")
b = fe.backend.get_lr(model=m) # 0.001
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
Union[Model, Module]
|
A neural network instance to inspect. |
required |
Returns:
Type | Description |
---|---|
float
|
The learning rate of |
Raises:
Type | Description |
---|---|
ValueError
|
If |