tensorflow::ops::ResourceApplyFtrl

#include <training_ops.h>

Cập nhật '*var' theo lược đồ Ftrl-proximal.

Bản tóm tắt

accum_new = accum + grad * grad tuyến tính += grad - (accum_new^(-lr_power) - accum^(-lr_power)) / lr * var bậc hai = 1.0 / (accum_new^(lr_power) * lr) + 2 * l2 var = (dấu(tuyến tính) * l1 - tuyến tính) / bậc hai nếu |tuyến tính| > l1 khác 0,0 tích lũy = tích lũy_new

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().
  • tuyến tính: Nên được lấy từ một biến (Variable).
  • grad: Độ dốc.
  • lr: Hệ số tỷ lệ. Phải là một đại lượng vô hướng.
  • l1: Chuẩn hóa L1. Phải là một đại lượng vô hướng.
  • l2: Chuẩn hóa L2. Phải là một đại lượng vô hướng.
  • lr_power: Hệ số tỷ lệ. Phải là một số 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.

Trả về:

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

ResourceApplyFtrl (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input lr_power)
ResourceApplyFtrl (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input lr_power, const ResourceApplyFtrl::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)

Cấu trúc

tensorflow::ops::ResourceApplyFtrl::Attrs

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

Thuộc tính công khai

hoạt động

Operation operation

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

ResourceApplyFtrl

 ResourceApplyFtrl(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input lr_power
)

ResourceApplyFtrl

 ResourceApplyFtrl(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input lr_power,
  const ResourceApplyFtrl::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
)