tensorflow::ops::SparseFillEmptyRows

#include <sparse_ops.h>

Giriş 2 boyutlu SparseTensor boş satırları varsayılan bir değerle doldurur.

Özet

Giriş SparseTensor inputs ( indices , values , dense_shape ) demeti aracılığıyla temsil edilir. Çıkış SparseTensor aynı dense_shape sahiptir ancak output_indices indeksleri ve output_values ​​değerlerine sahiptir.

Bu işlem, herhangi bir değeri olmayan her satır için tek bir giriş ekler. İndeks [row, 0, ..., 0] olarak oluşturulur ve eklenen değer default_value .

Örneğin, sp_input [5, 6] şeklinde olduğunu ve boş olmayan değerler içerdiğini varsayalım:

[0, 1]: a
[0, 3]: b
[2, 0]: c
[3, 1]: d

1. ve 4. satırlar boş olduğundan, çıktı [5, 6] şeklinde olacak ve şu değerleri içerecektir:

[0, 1]: a
[0, 3]: b
[1, 0]: default_value
[2, 0]: c
[3, 1]: d
[4, 0]: default_value

Çıktı SparseTensor satır öncelikli sırada olacak ve girişle aynı şekle sahip olacaktır.

Bu işlem ayrıca [dense_shape[0]] şeklinde bir gösterge vektörü döndürür, öyle ki

empty_row_indicator[i] = True iff row i was an empty row.

Ve geri yayılım sırasında kullanılan ters indeks haritası vektörü [indices.shape[0]] şeklindedir.

reverse_index_map[j] = out_j s.t. indices[j, :] == output_indices[out_j, :]

Argümanlar:

  • kapsam: Bir Kapsam nesnesi
  • İndeksler: 2 boyutlu. Seyrek tensörün indeksleri.
  • Değerler: 1 boyutlu. Seyrek tensörün değerleri.
  • dense_shape: 1 boyutlu, seyrek tensörün şekli.
  • default_value: 0 boyutlu. Giriş seyrek tensöründe eksik olan satırlar için [row, 0, ..., 0] konumuna eklenecek varsayılan değer. output indices: 2 boyutlu. Doldurulmuş seyrek tensörün indeksleri.

İadeler:

  • Output output_indeksleri
  • Output output_values: 1 boyutlu, doldurulmuş seyrek tensörün değerleri.
  • empty_row_indicator Output : 1 boyutlu. Giriş seyrek tensöründe yoğun satırın eksik olup olmadığını gösterir.
  • Output reverse_index_map: 1 boyutlu. Giriş indekslerinden çıkış indekslerine bir eşleme.

Yapıcılar ve Yıkıcılar

SparseFillEmptyRows (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input default_value)

Genel özellikler

empty_row_indicator
operation
output_indices
output_values
reverse_index_map

Genel özellikler

boş_satır_göstergesi

::tensorflow::Output empty_row_indicator

operasyon

Operation operation

çıktı_indeksleri

::tensorflow::Output output_indices

çıktı_değerleri

::tensorflow::Output output_values

ters_indeks_haritası

::tensorflow::Output reverse_index_map

Kamusal işlevler

SeyrekDoldurmaBoşSatırlar

 SparseFillEmptyRows(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input indices,
  ::tensorflow::Input values,
  ::tensorflow::Input dense_shape,
  ::tensorflow::Input default_value
)