tensorflow:: ops:: SparseBincount
#include <math_ops.h>Zlicza liczbę wystąpień każdej wartości w tablicy liczb całkowitych.
Streszczenie
Zwraca wektor o size i tym samym typie danych co weights . Jeśli weights jest puste, indeks i przechowuje liczbę zliczeń wartości i w arr . Jeśli weights nie jest puste, indeks i przechowuje sumę wartości w weights dla każdego indeksu, gdzie odpowiadająca wartość w arr to i .
Wartości w arr poza zakresem [0, rozmiar) są ignorowane.
Argumenty:
- zakres: obiekt zakresu
- indeksy: 2D int64
Tensor. - wartości: 1D int
Tensor. - dense_shape: 1D int64
Tensor. - rozmiar: nieujemny skalar int
Tensor. - weights: jest to
Tensorint32, int64, float32 lub float64 o takim samym kształcie jakinputlubTensoro długości 0, w którym przypadku zachowuje się tak, jakby wszystkie wagi były równe 1.
Atrybuty opcjonalne (patrz Attrs ):
- binary_output: bool; Określa, czy jądro powinno zliczać wystąpienia, czy liczbę wystąpień.
Zwroty:
-
Output:Tensor1D o długości równejsizelubTensor2D z [batch_size,size]. Liczby lub sumaryczne wagi dla każdej wartości w zakresie [0, size).
Konstruktory i destruktory | |
|---|---|
SparseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input size, :: tensorflow::Input weights) | |
SparseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input size, :: tensorflow::Input weights, const SparseBincount::Attrs & attrs) |
Atrybuty publiczne | |
|---|---|
operation | |
output | |
Funkcje publiczne | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Publiczne funkcje statyczne | |
|---|---|
BinaryOutput (bool x) | |
Struktury | |
|---|---|
| tensorflow:: ops:: SparseBincount:: Attrs | Opcjonalne settery atrybutów dla SparseBincount . |
Atrybuty publiczne
działanie
Operation operation
wyjście
::tensorflow::Output output
Funkcje publiczne
Rzadki licznik binarny
SparseBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input size, ::tensorflow::Input weights )
Rzadki licznik binarny
SparseBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input size, ::tensorflow::Input weights, const SparseBincount::Attrs & attrs )
węzeł
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Publiczne funkcje statyczne
Wyjście binarne
Attrs BinaryOutput( bool x )