tensorflow::Input::Initializer

tensorflow::Input::Initializer

#include <ops.h>

Initializer enables constructing an Input object from various kinds of C++ constants such as simple primitive constants and nested initializer lists representing a multi-dimensional array.

Summary

Initializer constructors are all templates, so the aforementioned kinds of C++ constants can be used to construct an Initializer. Initializer stores the value it got constructed with in a Tensor object.

Constructors and Destructors
Initializer(const T & v)
Construct from a scalar value of an arithmetic type or a type that can be converted to a string (eg.
Initializer(const Tensor & t)
Initializer(const T & v, const TensorShape & shape)
Construct from a scalar value and an explicit shape.
Initializer(const std::initializer_list< T > & v)
Construct from a initializer list of scalars (a one-dimensional tensor).
Initializer(const std::initializer_list< T > & v, const TensorShape & shape)
Construct from a initializer list of scalars and an explicit shape.
Initializer(const std::initializer_list< Initializer > & v)
Construct a multi-dimensional tensor from a nested initializer list.
Public attributes
status
tensor
Public functions
AsTensorProto()
TensorProto

Public attributes

status

Status tensorflow::Input::Initializer::status

tensor

Tensor tensorflow::Input::Initializer::tensor

Public functions

AsTensorProto

TensorProto tensorflow::Input::Initializer::AsTensorProto()

Initializer

 tensorflow::Input::Initializer::Initializer(
  const T & v
)

Construct from a scalar value of an arithmetic type or a type that can be converted to a string (eg.

a string literal).

Initializer

 tensorflow::Input::Initializer::Initializer(
  const Tensor & t
)

Initializer

 tensorflow::Input::Initializer::Initializer(
  const T & v,
  const TensorShape & shape
)

Construct from a scalar value and an explicit shape.

Initializer

 tensorflow::Input::Initializer::Initializer(
  const std::initializer_list< T > & v
)

Construct from a initializer list of scalars (a one-dimensional tensor).

Initializer

 tensorflow::Input::Initializer::Initializer(
  const std::initializer_list< T > & v,
  const TensorShape & shape
)

Construct from a initializer list of scalars and an explicit shape.

Initializer

 tensorflow::Input::Initializer::Initializer(
  const std::initializer_list< Initializer > & v
)

Construct a multi-dimensional tensor from a nested initializer list.

Note that C++ syntax allows nesting of arbitrarily typed initializer lists, so such invalid initializers cannot be disallowed at compile time. This function performs checks to make sure that the nested initializer list is indeed a valid multi-dimensional tensor.

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/struct/tensorflow/input/initializer.html

编程狮423活动
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部