tensorflow::ops::ResourceApplyKerasMomentum

#include <training_ops.h>

Cập nhật '*var' theo sơ đồ động lượng.

Bản tóm tắt

Đặt use_nesterov = True nếu bạn

Tôi muốn sử dụng động lượng Nesterov.

tích lũy = tích lũy * động lượng - lr * grad var += tích lũy

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: Hệ số tỷ lệ. Phải là một đại lượng vô hướng.
  • grad: Độ dốc.
  • Động lượng: Động lượng. Phải là một đại lượng vô hướng.

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.
  • use_nesterov: Nếu True , tensor được truyền để tính grad sẽ là var + momentum * accum, vì vậy cuối cùng, var bạn nhận được thực chất là var + momentum * accum.

Trả về:

Hàm khởi tạo và hàm hủy

ResourceApplyKerasMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum)
ResourceApplyKerasMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum, const ResourceApplyKerasMomentum::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

UseLocking (bool x)
UseNesterov (bool x)

Cấu trúc

tensorflow::ops::ResourceApplyKerasMomentum::Attrs

Các thiết lập thuộc tính tùy chọn cho ResourceApplyKerasMomentum .

Thuộc tính công khai

hoạt động

Operation operation

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

ResourceApplyKerasMomentum

 ResourceApplyKerasMomentum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input momentum
)

ResourceApplyKerasMomentum

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

operator::tensorflow::Operation

 operator::tensorflow::Operation() const 

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

Sử dụng khóa

Attrs UseLocking(
  bool x
)

UseNesterov

Attrs UseNesterov(
  bool x
)