tensorflow::ops::SparseApplyAdagrad
#include <training_ops.h>Cập nhật các mục liên quan trong '*var' và '*accum' theo lược đồ adagrad.
Bản tóm tắt
Đối với những hàng mà chúng ta đã có giá trị grad, chúng ta cập nhật var và accum như sau: $$accum += grad * grad$$ $$var -= lr * grad * (1 / sqrt(accum))$$
Luận điểm:
- phạm vi: Một đối tượng Phạm vi
- var: Nên được lấy từ một biến Variable().
- tích lũy: Nên được lấy từ một biến().
- lr: Tốc độ học. Phải là một đại lượng vô hướng.
- grad: Độ dốc.
- chỉ số: Một vectơ các chỉ số vào chiều thứ nhất của var và accum.
Các thuộc tính tùy chọn (xem Attrs ):
- use_locking: Nếu
True, việc cập nhật các tensor var và accum sẽ được bảo vệ bằng khóa; ngược lại, hành vi không được xác định, nhưng có thể ít xảy ra xung đột hơn.
Trả về:
-
Output: Giống như "var".
Hàm khởi tạo và hàm hủy | |
|---|---|
SparseApplyAdagrad (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input indices) | |
SparseApplyAdagrad (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input indices, const SparseApplyAdagrad::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 hàm tĩnh công khai | |
|---|---|
UpdateSlots (bool x) | |
UseLocking (bool x) | |
Cấu trúc | |
|---|---|
| tensorflow::ops::SparseApplyAdagrad::Attrs | Các thiết lập thuộc tính tùy chọn cho SparseApplyAdagrad . |
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
SparseApplyAdagrad
SparseApplyAdagrad( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input indices )
SparseApplyAdagrad
SparseApplyAdagrad( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input indices, const SparseApplyAdagrad::Attrs & attrs )
nút
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Các hàm tĩnh công khai
UpdateSlots
Attrs UpdateSlots( bool x )
Sử dụng khóa
Attrs UseLocking( bool x )