テンソルフロー::作戦::ヒストグラム固定幅

#include <math_ops.h>

値のヒストグラムを返します。

まとめ

テンソルvaluesを指定すると、この演算は、すべてのビンに該当するvaluesのエントリ数をカウントするランク 1 のヒストグラムを返します。ビンは同じ幅で、引数value_rangenbinsによって決定されます。

# 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]

引数:

  • スコープ:スコープオブジェクト
  • 値: 数値Tensor
  • value_range: Shape [2] valuesと同じdtypeTensor 。値 <= value_range[0] は hist[0] にマッピングされ、値 >= value_range[1] は hist[-1] にマッピングされます。
  • nbins: スカラーint32 Tensor 。ヒストグラムのビンの数。

戻り値:

  • Output : 値のヒストグラムを保持する 1 次元Tensor

コンストラクターとデストラクター

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)

パブリック属性

operation
out

公共機能

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

パブリック静的関数

Dtype (DataType x)

構造体

tensorflow:: ops:: HistogramFixedWidth:: Attrs

HistogramFixedWidthのオプションの属性セッター。

パブリック属性

手術

Operation operation

::tensorflow::Output out

公共機能

ヒストグラム固定幅

 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
)

ノード

::tensorflow::Node * node() const 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const 

パブリック静的関数

Dタイプ

Attrs Dtype(
  DataType x
)