dòng chảy :: hoạt động :: ResourceSparseApplyProximalGradientDescent
#include <training_ops.h>
Cập nhật thưa thớt '* var' dưới dạng thuật toán FOBOS với tốc độ học cố định.
Tóm lược
Đó là đối với các hàng chúng ta có grad, chúng ta cập nhật var như sau: prox_v = var - alpha * grad var = sign (prox_v) / (1 + alpha * l2) * max {| prox_v | -alpha * l1,0}
Tranh luận:
- phạm vi: Một đối tượng Phạm vi
- var: Phải từ một Biến ().
- alpha: Hệ số tỷ lệ. Phải là một vô hướng.
- l1: Chính quy hóa L1. Phải là một vô hướng.
- l2: Chính quy hóa L2. Phải là một vô hướng.
- grad: Độ dốc.
- chỉ số: Một vectơ của các chỉ số trong thứ nguyên đầu tiên của var và Accu.
Các thuộc tính tùy chọn (xem Phần Attrs
):
- use_locking: Nếu True, phép trừ 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ể ít biểu hiện sự cạnh tranh hơn.
Lợi nhuận:
-
Operation
đã tạo
Người xây dựng và Người phá hủy | |
---|---|
ResourceSparseApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices) | |
ResourceSparseApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices, const ResourceSparseApplyProximalGradientDescent::Attrs & attrs) |
Thuộc tính công khai | |
---|---|
operation |
Chức năng công cộng | |
---|---|
operator::tensorflow::Operation () const |
Các chức năng tĩnh công khai | |
---|---|
UseLocking (bool x) |
Cấu trúc | |
---|---|
tensorflow :: ops :: ResourceSparseApplyProximalGradientDescent :: Attrs | Bộ thiết lập thuộc tính tùy chọn cho ResourceSparseApplyProximalGradientDescent . |
Thuộc tính công khai
hoạt động
Operation operation
Chức năng công cộng
ResourceSparseApplyProximalGradientDescent
ResourceSparseApplyProximalGradientDescent( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input alpha, ::tensorflow::Input l1, ::tensorflow::Input l2, ::tensorflow::Input grad, ::tensorflow::Input indices )
ResourceSparseApplyProximalGradientDescent
ResourceSparseApplyProximalGradientDescent( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input alpha, ::tensorflow::Input l1, ::tensorflow::Input l2, ::tensorflow::Input grad, ::tensorflow::Input indices, const ResourceSparseApplyProximalGradientDescent::Attrs & attrs )
toán tử :: tensorflow :: Hoạt động
operator::tensorflow::Operation() const
Các chức năng tĩnh công khai
UseLocking
Attrs UseLocking( bool x )