dòng chảy :: hoạt động :: SparseApplyCenteredRMSProp
#include <training_ops.h>
Cập nhật '* var' theo thuật toán RMSProp ở giữa.
Tóm lược
Thuật toán RMSProp căn giữa sử dụng ước tính thời điểm thứ hai ở giữa (tức là phương sai) để chuẩn hóa, trái ngược với RMSProp thông thường, sử dụng thời điểm thứ hai (không căn giữa). Điều này thường giúp ích cho việc đào tạo, nhưng hơi tốn kém hơn về tính toán và bộ nhớ.
Lưu ý rằng khi triển khai dày đặc thuật toán này, mg, ms và mom sẽ cập nhật ngay cả khi grad bằng 0, nhưng trong triển khai thưa thớt này, mg, ms và mom sẽ không cập nhật trong các lần lặp lại mà grad bằng 0.
mean_square = phân rã * mean_square + (1-phân rã) * gradient ** 2 mean_grad = phân rã * mean_grad + (1-phân rã) * gradient Delta = learning_rate * gradient / sqrt (mean_square + epsilon - mean_grad ** 2)
Tranh luận:
- phạm vi: Một đối tượng Phạm vi
- var: Phải từ một Biến ().
- mg: Phải từ một Biến ().
- ms: Phải từ một Biến ().
- mẹ: Nên từ một Biến ().
- lr: Hệ số tỷ lệ. Phải là một vô hướng.
- rho: Tỷ lệ phân rã. Phải là một vô hướng.
- epsilon: Thuật ngữ Ridge. Phải là một vô hướng.
- grad: Độ dốc.
- chỉ số: Một vectơ chỉ số thành thứ nguyên đầu tiên của var, ms và mom.
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 tensors var, mg, ms và mom đượ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ể ít biểu hiện sự cạnh tranh hơn.
Lợi nhuận:
-
Output
: Giống như "var".
Người xây dựng và Người phá hủy | |
---|---|
SparseApplyCenteredRMSProp (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input mg, :: tensorflow::Input ms, :: tensorflow::Input mom, :: tensorflow::Input lr, :: tensorflow::Input rho, :: tensorflow::Input momentum, :: tensorflow::Input epsilon, :: tensorflow::Input grad, :: tensorflow::Input indices) | |
SparseApplyCenteredRMSProp (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input mg, :: tensorflow::Input ms, :: tensorflow::Input mom, :: tensorflow::Input lr, :: tensorflow::Input rho, :: tensorflow::Input momentum, :: tensorflow::Input epsilon, :: tensorflow::Input grad, :: tensorflow::Input indices, const SparseApplyCenteredRMSProp::Attrs & attrs) |
Thuộc tính công cộng | |
---|---|
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) |
Cấu trúc | |
---|---|
tensorflow :: ops :: SparseApplyCenteredRMSProp :: Attrs | Bộ thiết lập thuộc tính tùy chọn cho SparseApplyCenteredRMSProp . |
Thuộc tính công cộng
hoạt động
Operation operation
ngoài
::tensorflow::Output out
Chức năng công cộng
SparseApplyCenteredRMSProp
SparseApplyCenteredRMSProp( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input mg, ::tensorflow::Input ms, ::tensorflow::Input mom, ::tensorflow::Input lr, ::tensorflow::Input rho, ::tensorflow::Input momentum, ::tensorflow::Input epsilon, ::tensorflow::Input grad, ::tensorflow::Input indices )
SparseApplyCenteredRMSProp
SparseApplyCenteredRMSProp( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input mg, ::tensorflow::Input ms, ::tensorflow::Input mom, ::tensorflow::Input lr, ::tensorflow::Input rho, ::tensorflow::Input momentum, ::tensorflow::Input epsilon, ::tensorflow::Input grad, ::tensorflow::Input indices, const SparseApplyCenteredRMSProp::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 )