tensorflow::ops::ResourceSparseApplyAdagrad

#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 các 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ề:

Hàm khởi 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

Các 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

ResourceSparseApplyAdagrad

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

ResourceSparseApplyAdagrad

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

operator::tensorflow::Operation

 operator::tensorflow::Operation() const 

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

UpdateSlots

Attrs UpdateSlots(
  bool x
)

Sử dụng khóa

Attrs UseLocking(
  bool x
)