dòng chảy căng:: ôi:: Tài nguyênÁp dụngFtrlV2

#include <training_ops.h>

Cập nhật '*var' theo sơ đồ Ftrl-proximal.

Bản tóm tắt

grad_with_shrinkage = grad + 2 * l2_shrinkage * var accum_new = accum + grad_with_shrinkage * grad_with_shrinkage tuyến tính += grad_with_shrinkage + (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

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().
  • tuyến tính: Phải từ một Biến().
  • grad: Độ dốc.
  • lr: Hệ số tỷ lệ. Phải là một vô hướng.
  • l1: Chính quy L1. Phải là một vô hướng.
  • l2: Quy luật co ngót L2. Phải là một vô hướng.
  • lr_power: Hệ số tỷ lệ. Phải là một vô hướng.

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

ResourceApplyFtrlV2 (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 l2_shrinkage, :: tensorflow::Input lr_power)
ResourceApplyFtrlV2 (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 l2_shrinkage, :: tensorflow::Input lr_power, const ResourceApplyFtrlV2::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:: ResourceApplyFtrlV2:: Attrs

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

Thuộc tính công khai

hoạt động

Operation operation

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

Tài nguyênÁp dụngFtrlV2

 ResourceApplyFtrlV2(
  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 l2_shrinkage,
  ::tensorflow::Input lr_power
)

Tài nguyênÁp dụngFtrlV2

 ResourceApplyFtrlV2(
  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 l2_shrinkage,
  ::tensorflow::Input lr_power,
  const ResourceApplyFtrlV2::Attrs & attrs
)

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

 operator::tensorflow::Operation() const 

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

Sử dụngKhóa

Attrs UseLocking(
  bool x
)