tensorflow:: ops:: HistogramFixedWidth

#include <math_ops.h>

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

まとめ

テンソルvaluesが与えられると、この操作は、各ビンに含まれるvaluesのエントリ数をカウントするランク1のヒストグラムを返します。ビンの幅は等しく、引数value_rangeと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]

議論:

  • スコープ:スコープオブジェクト
  • 値: 数値Tensor 。
  • value_range: 形状 [2] valuesと同じdtypeのTensor 。values <= value_range[0] は hist[0] にマッピングされ、values >= 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 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

データ型

Attrs Dtype(
  DataType x
)