Link Search Menu Expand Document

BiasAdd


tensorflow C++ API

tensorflow::ops::BiasAdd

Addsbiastovalue.


Summary

This is a special case oftf.addwherebiasis restricted to be 1-D. Broadcasting is supported, sovaluemay have any number of dimensions.

Arguments:

  • scope: A Scope objectA
  • value:Any number of dimensions.
  • bias: 1-D with size the last dimension ofvalue.

Optional attributes (seeAttrs):

  • data_format: Specify the data format of the input and output data. With the default format “NHWC”, the bias tensor will be added to the last dimension of the value tensor. Alternatively, the format could be “NCHW”, the data storage order of: [batch, in_channels, in_height, in_width]. The tensor will be added to “in_channels”, the third-to-the-last dimension.

Returns:

  • Output: Broadcasted sum ofvalueandbias.

BiasAdd block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_nn.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • Input value: connect Input node.
  • Input bias: connect Input node.
  • BiasAdd ::Attrs attrs : Input attrs in value. ex) data_format_ = NHWC;

Return:

  • Output output : Output object of BiasAdd class object.

Result:

  • std::vector(Tensor) result_output : Returned object of executed result by calling session.

Using Method