dòng chảy :: hoạt động :: ApplyAdam
#include <training_ops.h>
Cập nhật '* var' theo thuật toán Adam.
Tóm lược
$$lr_t := {learning_rate} * {1 - beta_2^t} / (1 - beta_1^t)$$
$$m_t := beta_1 * m_{t-1} + (1 - beta_1) * g$$
$$v_t := beta_2 * v_{t-1} + (1 - beta_2) * g * g$$
$$variable := variable - lr_t * m_t / ({v_t} + )$$
Tranh luận:
- phạm vi: Một đối tượng Phạm vi
- var: Phải từ một Biến ().
- m: Nên từ một Biến ().
- v: Nên từ một Biến ().
- beta1_power: Phải là một đại lượng vô hướng.
- beta2_power: Phải là một đại lượng vô hướng.
- lr: Hệ số tỷ lệ. Phải là một vô hướng.
- beta1: Hệ số xung lượng. Phải là một vô hướng.
- beta2: Hệ số xung lượng. Phải là một vô hướng.
- epsilon: Thuật ngữ Ridge. Phải là một vô hướng.
- grad: Độ dốc.
Các thuộc tính tùy chọn (xem Phần Attrs
):
- use_locking: Nếu
True
, việc cập nhật các tenxơ var, m và v sẽ được bảo vệ bằng một khóa; nếu không thì hành vi không được xác định, nhưng có thể biểu hiện ít tranh chấp hơn. - use_nesterov: Nếu
True
, sử dụng bản cập nhật nesterov.
Lợi nhuận:
-
Output
: Giống như "var".
Người xây dựng và Người phá hủy | |
---|---|
ApplyAdam (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input m, :: tensorflow::Input v, :: tensorflow::Input beta1_power, :: tensorflow::Input beta2_power, :: tensorflow::Input lr, :: tensorflow::Input beta1, :: tensorflow::Input beta2, :: tensorflow::Input epsilon, :: tensorflow::Input grad) | |
ApplyAdam (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input m, :: tensorflow::Input v, :: tensorflow::Input beta1_power, :: tensorflow::Input beta2_power, :: tensorflow::Input lr, :: tensorflow::Input beta1, :: tensorflow::Input beta2, :: tensorflow::Input epsilon, :: tensorflow::Input grad, const ApplyAdam::Attrs & attrs) |
Thuộc tính công khai | |
---|---|
operation | |
out |
Chức năng công cộng | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Các chức năng tĩnh công khai | |
---|---|
UseLocking (bool x) | |
UseNesterov (bool x) |
Cấu trúc | |
---|---|
tensorflow :: ops :: ApplyAdam :: Attrs | Bộ thiết lập thuộc tính tùy chọn cho ApplyAdam . |
Thuộc tính công khai
hoạt động
Operation operation
ngoài
::tensorflow::Output out
Chức năng công cộng
ApplyAdam
ApplyAdam( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input m, ::tensorflow::Input v, ::tensorflow::Input beta1_power, ::tensorflow::Input beta2_power, ::tensorflow::Input lr, ::tensorflow::Input beta1, ::tensorflow::Input beta2, ::tensorflow::Input epsilon, ::tensorflow::Input grad )
ApplyAdam
ApplyAdam( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input m, ::tensorflow::Input v, ::tensorflow::Input beta1_power, ::tensorflow::Input beta2_power, ::tensorflow::Input lr, ::tensorflow::Input beta1, ::tensorflow::Input beta2, ::tensorflow::Input epsilon, ::tensorflow::Input grad, const ApplyAdam::Attrs & attrs )
nút
::tensorflow::Node * node() const
toán tử :: tensorflow :: Đầu vào
operator::tensorflow::Input() const
toán tử :: tensorflow :: Đầu ra
operator::tensorflow::Output() const
Các chức năng tĩnh công khai
UseLocking
Attrs UseLocking( bool x )
UseNesterov
Attrs UseNesterov( bool x )