aliran tensor:: operasi:: Kurangi Gabung

#include <string_ops.h>

Menggabungkan Tensor string pada dimensi tertentu.

Ringkasan

Menghitung gabungan string lintas dimensi dalam Tensor bentuk string tertentu [\\(d_0, d_1, ..., d_{n-1}\\)] . Mengembalikan Tensor baru yang dibuat dengan menggabungkan string input dengan pemisah yang diberikan (default: string kosong). Indeks negatif dihitung mundur dari akhir, dengan -1 setara dengan n - 1 . Jika indeks tidak ditentukan, gabungkan seluruh dimensi mulai dari n - 1 hingga 0 .

Misalnya:

# tensor `a` is [["a", "b"], ["c", "d"]]
tf.reduce_join(a, 0) ==> ["ac", "bd"]
tf.reduce_join(a, 1) ==> ["ab", "cd"]
tf.reduce_join(a, -2) = tf.reduce_join(a, 0) ==> ["ac", "bd"]
tf.reduce_join(a, -1) = tf.reduce_join(a, 1) ==> ["ab", "cd"]
tf.reduce_join(a, 0, keep_dims=True) ==> [["ac", "bd"]]
tf.reduce_join(a, 1, keep_dims=True) ==> [["ab"], ["cd"]]
tf.reduce_join(a, 0, separator=".") ==> ["a.c", "b.d"]
tf.reduce_join(a, [0, 1]) ==> "acbd"
tf.reduce_join(a, [1, 0]) ==> "abcd"
tf.reduce_join(a, []) ==> [["a", "b"], ["c", "d"]]
tf.reduce_join(a) = tf.reduce_join(a, [1, 0]) ==> "abcd"

Argumen:

  • ruang lingkup: Objek Lingkup
  • inputs : Input yang akan digabungkan. Semua indeks yang dikurangi harus berukuran bukan nol.
  • reduksi_indeks: Dimensi yang akan dikurangi. Dimensi dikurangi dalam urutan yang ditentukan. Menghilangkan reduction_indices sama dengan meneruskan [n-1, n-2, ..., 0] . Indeks negatif dari -n hingga -1 didukung.

Atribut opsional (lihat Attrs ):

  • keep_dims: Jika True , pertahankan dimensi yang diperkecil dengan panjang 1 .
  • pemisah: Pemisah yang digunakan saat bergabung.

Pengembalian:

  • Output : Memiliki bentuk yang sama dengan input dengan pengurangan dimensi dihapus atau disetel ke 1 bergantung pada keep_dims .

Konstruktor dan Destruktor

ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices)
ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices, const ReduceJoin::Attrs & attrs)

Atribut publik

operation
output

Fungsi publik

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

Fungsi statis publik

KeepDims (bool x)
Separator (StringPiece x)

Struktur

tensorflow:: ops:: ReduceJoin:: Attrs

Penyetel atribut opsional untuk ReduceJoin .

Atribut publik

operasi

Operation operation

keluaran

::tensorflow::Output output

Fungsi publik

Kurangi Gabung

 ReduceJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input reduction_indices
)

Kurangi Gabung

 ReduceJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input reduction_indices,
  const ReduceJoin::Attrs & attrs
)

simpul

::tensorflow::Node * node() const 

operator::tensorflow::Masukan

 operator::tensorflow::Input() const 

operator::tensorflow::Keluaran

 operator::tensorflow::Output() const 

Fungsi statis publik

Pertahankan Redup

Attrs KeepDims(
  bool x
)

Pemisah

Attrs Separator(
  StringPiece x
)