dòng chảy căng:: ôi:: Tài nguyênThưa thớtÁp dụngAdagrad

#include <training_ops.h>

Cập nhật các mục có liên quan trong '*var' và '*accum' theo sơ đồ adagrad.

Bản tóm tắt

Đó là đối với các hàng mà chúng tôi có grad, chúng tôi cập nhật var và accum như sau: accum += grad * grad var -= lr * grad * (1 / sqrt(accum))

Tranh luận:

  • phạm vi: Một đối tượng Phạm vi
  • var: Phải từ một Biến().
  • tích lũy: Phải từ một Biến().
  • lr: Tốc độ học tập. Phải là một vô hướng.
  • grad: Độ dốc.
  • chỉ số: Một vectơ chỉ số vào chiều thứ nhất của var và accum.

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; mặt khác, hành vi không được xác định, nhưng có thể ít gây tranh cãi hơn.

Trả về:

Hàm tạo và hàm hủy

ResourceSparseApplyAdagrad (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input indices)
ResourceSparseApplyAdagrad (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input indices, const ResourceSparseApplyAdagrad::Attrs & attrs)

Thuộc tính công khai

operation

Chức năng công cộng

operator::tensorflow::Operation () const

Các hàm tĩnh công khai

UpdateSlots (bool x)
UseLocking (bool x)

Cấu trúc

tensorflow:: ops:: ResourceSparseApplyAdagrad:: Attrs

Trình thiết lập thuộc tính tùy chọn cho ResourceSparseApplyAdagrad .

Thuộc tính công khai

hoạt động

Operation operation

Chức năng công cộng

Tài nguyênThưa thớtÁp dụngAdagrad

 ResourceSparseApplyAdagrad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices
)

Tài nguyênThưa thớtÁp dụngAdagrad

 ResourceSparseApplyAdagrad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  const ResourceSparseApplyAdagrad::Attrs & attrs
)

toán tử::tenorflow::Hoạt động

 operator::tensorflow::Operation() const 

Các hàm tĩnh công khai

Cập nhậtSlots

Attrs UpdateSlots(
  bool x
)

Sử dụngKhóa

Attrs UseLocking(
  bool x
)