tensorflow::ops::DecodeImage::Attrs

#include <image_ops.h>

Optional attribute setters for DecodeImage.

Summary

Public attributes

channels_ = 0
int64
dtype_ = DT_UINT8
DataType
expand_animations_ = true
bool

Public functions

Channels(int64 x)
TF_MUST_USE_RESULT Attrs
Number of color channels for the decoded image.
Dtype(DataType x)
TF_MUST_USE_RESULT Attrs
The desired DType of the returned Tensor.
ExpandAnimations(bool x)
TF_MUST_USE_RESULT Attrs
Controls the output shape of the returned op.

Public attributes

channels_

int64 tensorflow::ops::DecodeImage::Attrs::channels_ = 0

dtype_

DataType tensorflow::ops::DecodeImage::Attrs::dtype_ = DT_UINT8

expand_animations_

bool tensorflow::ops::DecodeImage::Attrs::expand_animations_ = true

Public functions

Channels

TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeImage::Attrs::Channels(
  int64 x
)

Number of color channels for the decoded image.

Defaults to 0

Dtype

TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeImage::Attrs::Dtype(
  DataType x
)

The desired DType of the returned Tensor.

Defaults to DT_UINT8

ExpandAnimations

TF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeImage::Attrs::ExpandAnimations(
  bool x
)

Controls the output shape of the returned op.

If True, the returned op will produce a 3-D tensor for PNG, JPEG, and BMP files; and a 4-D tensor for all GIFs, whether animated or not. If, False, the returned op will produce a 3-D tensor for all file types and will truncate animated GIFs to the first frame.

Defaults to true