dòng chảy :: hoạt động :: ResourceSparseApplyFtrlV2

#include <training_ops.h>

Cập nhật các mục nhập có liên quan trong '* var' theo lược đồ Ftrl-proximal.

Tóm lược

Đó là đối với các hàng mà chúng tôi có grad, chúng tôi cập nhật var, Accu và tuyến tính như sau: grad_with_shrinkage = grad + 2 * l2_shrinkage * var ắc_new = ắc + grad_with_shrinkage * grad_with_shrinkage tuyến tính + = grad_with_shrinkage + (Acc_new ^ (- lr_power) - ắc ^ (-lr_power)) / lr * var quadratic = 1.0 / (Accu_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 Accu = Accu_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: Nên từ một Biến ().
  • tuyến tính: Phải từ một Biến ().
  • grad: Độ dốc.
  • chỉ số: Một vectơ của các chỉ số trong thứ nguyên đầu tiên của var và Accu.
  • lr: Hệ số tỷ lệ. Phải là một vô hướng.
  • l1: Chính quy hóa L1. Phải là một vô hướng.
  • l2: Điều hòa 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.

Các thuộc tính tùy chọn (xem Phần Attrs ):

  • use_locking: Nếu True , việc cập nhật các tenxơ var và tích lũy sẽ được bảo vệ bằng một khóa; nếu không thì hành vi không được xác định, nhưng có thể ít biểu hiện sự cạnh tranh hơn.

Lợi nhuận:

Người xây dựng và Người phá hủy

ResourceSparseApplyFtrlV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input indices, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input l2_shrinkage, :: tensorflow::Input lr_power)
ResourceSparseApplyFtrlV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input indices, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input l2_shrinkage, :: tensorflow::Input lr_power, const ResourceSparseApplyFtrlV2::Attrs & attrs)

Thuộc tính công khai

operation

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

operator::tensorflow::Operation () const

Chức năng tĩnh công khai

UseLocking (bool x)

Cấu trúc

tensorflow :: ops :: ResourceSparseApplyFtrlV2 :: Attrs

Bộ thiết lập thuộc tính tùy chọn cho ResourceSparseApplyFtrlV2 .

Thuộc tính công khai

hoạt động

Operation operation

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

ResourceSparseApplyFtrlV2

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

ResourceSparseApplyFtrlV2

 ResourceSparseApplyFtrlV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input l2_shrinkage,
  ::tensorflow::Input lr_power,
  const ResourceSparseApplyFtrlV2::Attrs & attrs
)

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

 operator::tensorflow::Operation() const 

Chức năng tĩnh công khai

UseLocking

Attrs UseLocking(
  bool x
)