Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::DecodeImage::Attrs
#include <image_ops.h>
Optional attribute setters for DecodeImage.
Summary
Public functions
|
Channels(int64 x)
|
Number of color channels for the decoded image.
|
Dtype(DataType x)
|
The desired DType of the returned Tensor.
|
ExpandAnimations(bool x)
|
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
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-11-15 UTC.
[null,null,["Last updated 2021-11-15 UTC."],[],[],null,["# tensorflow::ops::DecodeImage::Attrs Struct Reference\n\ntensorflow::ops::DecodeImage::Attrs\n===================================\n\n`#include \u003cimage_ops.h\u003e`\n\nOptional attribute setters for [DecodeImage](/api_docs/cc/class/tensorflow/ops/decode-image#classtensorflow_1_1ops_1_1_decode_image).\n\nSummary\n-------\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------------------------|------------|\n| [channels_](#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs_1a16aa607e1a5151dede520619378ab295)` = 0` | `int64` |\n| [dtype_](#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs_1a3a318a0404dd48fa085ea4f22b8c564b)` = DT_UINT8` | `DataType` |\n| [expand_animations_](#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs_1a2ad9fac6cebdeb90187f5aa4b67115e6)` = true` | `bool` |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Channels](#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs_1a881c7437b561a550118c5f06841fbe2a)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/decode-image/attrs#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs) Number of color channels for the decoded image. |\n| [Dtype](#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs_1aecdb8e63749abe9fd14ba7c5dca12938)`(DataType x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/decode-image/attrs#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs) The desired DType of the returned [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor). |\n| [ExpandAnimations](#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs_1adb2a6c7b2ca24aa3c01a1e1692e69fab)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/decode-image/attrs#structtensorflow_1_1ops_1_1_decode_image_1_1_attrs) Controls the output shape of the returned op. |\n\nPublic attributes\n-----------------\n\n### channels_\n\n```scdoc\nint64 tensorflow::ops::DecodeImage::Attrs::channels_ = 0\n``` \n\n### dtype_\n\n```carbon\nDataType tensorflow::ops::DecodeImage::Attrs::dtype_ = DT_UINT8\n``` \n\n### expand_animations_\n\n```scdoc\nbool tensorflow::ops::DecodeImage::Attrs::expand_animations_ = true\n``` \n\nPublic functions\n----------------\n\n### Channels\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeImage::Attrs::Channels(\n int64 x\n)\n``` \nNumber of color channels for the decoded image.\n\nDefaults to 0 \n\n### Dtype\n\n```carbon\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeImage::Attrs::Dtype(\n DataType x\n)\n``` \nThe desired DType of the returned [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n\nDefaults to DT_UINT8 \n\n### ExpandAnimations\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::DecodeImage::Attrs::ExpandAnimations(\n bool x\n)\n``` \nControls the output shape of the returned op.\n\nIf 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.\n\nDefaults to true"]]