텐서플로우:: 작전:: 분산Nd업데이트
#include <state_ops.h> 특정 값 내의 개별 값이나 조각에 희소 updates 적용합니다.
요약
 indices 에 따라 변수.
 ref 는 P 등급의 Tensor 이고 indices 는 Q 등급의 Tensor 입니다.
 indices ref 에 대한 인덱스를 포함하는 정수 텐서여야 합니다. 모양이 나와야지 \([d_0, ..., d_{Q-2}, K]\) 여기서 0 < K <= P .
 indices 의 가장 안쪽 차원(길이 K )은 ref 의 K 번째 차원을 따라 요소( K = P 인 경우) 또는 슬라이스( K < P 인 경우)에 대한 인덱스에 해당합니다.
 updates Q-1+PK 순위의 Tensor 이며 모양은 다음과 같습니다.
$$[d_0, ..., d_{Q-2}, ref.shape[K], ..., ref.shape[P-1]].$$
예를 들어, 4개의 분산 요소를 랭크 1 텐서의 8개 요소로 업데이트한다고 가정해 보겠습니다. Python에서 해당 업데이트는 다음과 같습니다.
ref = tf.Variable([1, 2, 3, 4, 5, 6, 7, 8]) indices = tf.constant([[4], [3], [1] ,[7]]) updates = tf.constant([9, 10, 11, 12]) update = tf.scatter_nd_update(ref, indices, updates) with tf.Session() as sess: print sess.run(update)
ref에 대한 결과 업데이트는 다음과 같습니다.
[1, 11, 3, 10, 9, 6, 7, 12]
 슬라이스를 업데이트하는 방법에 대한 자세한 내용은 tf.scatter_nd 참조하세요.
 tf.scatter_update 및 tf.batch_scatter_update 도 참조하세요.
인수:
- 범위: 범위 개체
- ref: 변경 가능한 Tensor . 변수 노드에서 가져와야 합니다.
- 인덱스: Tensor . int32, int64 유형 중 하나여야 합니다. 심판에 대한 인덱스의 텐서.
- 업데이트: Tensor . ref와 동일한 유형이어야 합니다. 참조에 추가할 업데이트된 값의 텐서입니다.
 선택적 속성( Attrs 참조):
- use_locking: 선택적 bool입니다. 기본값은 True입니다. True이면 할당이 잠금으로 보호됩니다. 그렇지 않으면 동작이 정의되지 않지만 경합이 덜 나타날 수 있습니다.
보고:
-  Output: 심판과 동일 업데이트가 완료된 후 업데이트된 값을 사용하려는 작업의 편의를 위해 반환됩니다.
| 생성자와 소멸자 | |
|---|---|
| ScatterNdUpdate (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates) | |
| ScatterNdUpdate (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ScatterNdUpdate::Attrs & attrs) | 
| 공개 속성 | |
|---|---|
| operation | |
| output_ref | |
| 공공 기능 | |
|---|---|
| node () const | ::tensorflow::Node * | 
| operator::tensorflow::Input () const | |
| operator::tensorflow::Output () const | |
| 공개 정적 함수 | |
|---|---|
| UseLocking (bool x) | |
| 구조체 | |
|---|---|
| 텐서플로우:: ops:: ScatterNdUpdate:: 속성 | ScatterNdUpdate 에 대한 선택적 속성 설정자입니다. | 
공개 속성
작업
Operation operation
출력_참조
::tensorflow::Output output_ref
공공 기능
분산Nd업데이트
ScatterNdUpdate( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates )
분산Nd업데이트
ScatterNdUpdate( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterNdUpdate::Attrs & attrs )
마디
::tensorflow::Node * node() const
연산자::텐서플로우::입력
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
사용잠금
Attrs UseLocking( bool x )