tensorflow::ops::HistogramFixedWidth
#include <math_ops.h>Menampilkan histogram nilai.
Ringkasan
Berdasarkan values tensor, operasi ini mengembalikan histogram peringkat 1 yang menghitung jumlah entri dalam values yang masuk ke setiap bin. Bin memiliki lebar yang sama dan ditentukan oleh argumen value_range dan 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]
Argumen:
- Cakupan: Objek Cakupan
- nilai:
TensorNumerik. - value_range: Bentuk [2]
Tensordengandtypeyang sama denganvalues. nilai <= value_range[0] akan dipetakan ke hist[0], nilai >= value_range[1] akan dipetakan ke hist[-1]. - nbins:
int32 TensorSkalar. Jumlah bin histogram.
Mengembalikan:
Konstruktor dan Destruktor | |
|---|---|
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) |
Atribut publik | |
|---|---|
operation | |
out | |
Fungsi publik | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Fungsi statis publik | |
|---|---|
Dtype (DataType x) | |
Struktur | |
|---|---|
| tensorflow::ops::HistogramFixedWidth::Attrs | Pengaturan atribut opsional untuk HistogramFixedWidth . |
Atribut publik
operasi
Operation operation
keluar
::tensorflow::Output out
Fungsi publik
HistogramLebarTetap
HistogramFixedWidth( const ::tensorflow::Scope & scope, ::tensorflow::Input values, ::tensorflow::Input value_range, ::tensorflow::Input nbins )
HistogramLebarTetap
HistogramFixedWidth( const ::tensorflow::Scope & scope, ::tensorflow::Input values, ::tensorflow::Input value_range, ::tensorflow::Input nbins, const HistogramFixedWidth::Attrs & attrs )
simpul
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Fungsi statis publik
Tipe D
Attrs Dtype( DataType x )