tensorflow:: ops:: HistogramStałaSzerokość
#include <math_ops.h>Zwraca histogram wartości.
Streszczenie
Biorąc pod uwagę values tensora, ta operacja zwraca histogram rangi 1, zliczający liczbę wpisów w values , które mieszczą się w każdym przedziale. Przedziały mają równą szerokość i są określane przez argumenty value_range i nbins .
# Bins will be: (-inf, 1), [1, 2), [2, 3), [3, 4), [4, inf) nbins = 5 value_range = [0.0, 5.0] new_values = [-1.0, 0.0, 1.5, 2.0, 5.0, 15]
with tf.get_default_session() as sess: hist = tf.histogram_fixed_width(new_values, value_range, nbins=5) variables.global_variables_initializer().run() sess.run(hist) => [2, 1, 1, 0, 2]
Argumenty:
- zakres: obiekt zakresu
- wartości:
Tensornumeryczny. - value_range: Kształt [2]
Tensortego samegodtypecovalues. Wartości <= value_range[0] zostaną zamapowane na hist[0], wartości >= value_range[1] zostaną zamapowane na hist[-1]. - nbins: Skalar
int32 Tensor. Liczba przedziałów histogramu.
Zwroty:
Konstruktory i destruktory | |
|---|---|
HistogramFixedWidth (const :: tensorflow::Scope & scope, :: tensorflow::Input values, :: tensorflow::Input value_range, :: tensorflow::Input nbins) | |
HistogramFixedWidth (const :: tensorflow::Scope & scope, :: tensorflow::Input values, :: tensorflow::Input value_range, :: tensorflow::Input nbins, const HistogramFixedWidth::Attrs & attrs) |
Atrybuty publiczne | |
|---|---|
operation | |
out | |
Funkcje publiczne | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Publiczne funkcje statyczne | |
|---|---|
Dtype (DataType x) | |
Struktury | |
|---|---|
| tensorflow:: ops:: HistogramFixedWidth:: Attrs | Opcjonalne settery atrybutów dla HistogramFixedWidth . |
Atrybuty publiczne
działanie
Operation operation
na zewnątrz
::tensorflow::Output out
Funkcje publiczne
Histogram o stałej szerokości
HistogramFixedWidth( const ::tensorflow::Scope & scope, ::tensorflow::Input values, ::tensorflow::Input value_range, ::tensorflow::Input nbins )
Histogram o stałej szerokości
HistogramFixedWidth( const ::tensorflow::Scope & scope, ::tensorflow::Input values, ::tensorflow::Input value_range, ::tensorflow::Input nbins, const HistogramFixedWidth::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
Typ danych
Attrs Dtype( DataType x )