Ftrl
Customizes the Ftrl optimizer.
Prototype
1 | def create_hash_optimizer(learning_rate, use_locking=False, name="Ftrl", **kwargs) |
Parameters
Parameter |
Type |
Mandatory/Optional |
Description |
|---|---|---|---|
learning_rate |
float/tf.Tensor |
Mandatory |
Learning rate Value range: [0.0, 10.0] |
use_locking |
bool |
Optional |
Prevents concurrent updates of variables. Default value: False Value range:
|
name |
string |
Optional |
Name of the optimizer. Default value: Ftrl Name length range: [1, 200] |
**kwargs Parameters
Parameter |
Type |
Mandatory/Optional |
Description |
|---|---|---|---|
learning_rate_power |
float |
Optional |
Controls the decrease of learning rate during training. Default value: –0.5 Value range: [–2147483647.0, 0.0] |
initial_accumulator_value |
float |
Optional |
Initial value of the accumulator Default value: 0.1 Value range: (0.0, 1.0] |
l1_regularization_strength |
float |
Optional |
L1 regularization penalty Default value: 0.0 Value range: [0.0, 10000.0] |
l2_regularization_strength |
float |
Optional |
L2 regularization penalty Default value: 0.0 Value range: [0.0, 10000.0] |
accum_name |
string |
Optional |
Suffix of the variable of the gradient square accumulator Default value: None Value range: [1, 255] |
linear_name |
string |
Optional |
Suffix of the variable of the linear gradient accumulator Default value: None Value range: [1, 255] |
l2_shrinkage_regularization_strength |
float |
Optional |
L2 shrinkage penalty Default value: 0.0 Value range: [0.0, 10000.0] |
If kwargs is used to pass other parameters that are not described, Rec SDK TensorFlow does not use these parameters.
Return Value
An instance object of the CustomizedFtrl optimizer.
Example
1 2 | from mx_rec.optimizers.ftrl import create_hash_optimizer hashtable_optimizer = create_hash_optimizer(0.001) |