Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::Conv::Attrs
#include <nn_ops.h>
Optional attribute setters for Conv.
Summary
Public functions
|
BatchDims(int64 x)
|
A positive integer specifying the number of batch dimensions for the input tensor.
|
DataFormat(StringPiece x)
|
Used to set the data format.
|
Dilations(const gtl::ArraySlice< int > & x)
|
1-D tensor of length N+2 .
|
ExplicitPaddings(const gtl::ArraySlice< int > & x)
|
If padding is "EXPLICIT" , the list of explicit padding amounts.
|
Groups(int64 x)
|
A positive integer specifying the number of groups in which the input is split along the channel axis.
|
Public attributes
batch_dims_
int64 tensorflow::ops::Conv::Attrs::batch_dims_ = 1
StringPiece tensorflow::ops::Conv::Attrs::data_format_ = "CHANNELS_LAST"
dilations_
gtl::ArraySlice< int > tensorflow::ops::Conv::Attrs::dilations_ = {}
explicit_paddings_
gtl::ArraySlice< int > tensorflow::ops::Conv::Attrs::explicit_paddings_ = {}
groups_
int64 tensorflow::ops::Conv::Attrs::groups_ = 1
Public functions
BatchDims
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::BatchDims(
int64 x
)
A positive integer specifying the number of batch dimensions for the input tensor.
Should be less than the rank of the input tensor.
Defaults to 1
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::DataFormat(
StringPiece x
)
Used to set the data format.
By default CHANNELS_FIRST
, uses NHWC (2D) / NDHWC (3D)
or if CHANNELS_LAST
, uses NCHW (2D) / NCDHW (3D)
.
Defaults to "CHANNELS_LAST"
Dilations
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::Dilations(
const gtl::ArraySlice< int > & x
)
1-D tensor of length N+2
.
The dilation factor for each dimension of input
. If set to k > 1
, there will be k-1
skipped cells between each filter element on that dimension. The dimension order is determined by the value of channels_last_format
, see above for details. Dilations in the batch and depth dimensions must be 1.
Defaults to []
ExplicitPaddings
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::ExplicitPaddings(
const gtl::ArraySlice< int > & x
)
If padding
is "EXPLICIT"
, the list of explicit padding amounts.
For the ith dimension, the amount of padding inserted before and after the dimension is explicit_paddings[2 * i]
and explicit_paddings[2 * i + 1]
, respectively. If padding
is not "EXPLICIT"
, explicit_paddings
must be empty.
Defaults to []
Groups
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::Groups(
int64 x
)
A positive integer specifying the number of groups in which the input is split along the channel axis.
Each group is convolved separately with filters / groups
filters. The output is the concatenation of all the groups results along the channel axis. Input channels and filters must both be divisible by groups.
Defaults to 1
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::Conv::Attrs Struct Reference\n\ntensorflow::ops::Conv::Attrs\n============================\n\n`#include \u003cnn_ops.h\u003e`\n\nOptional attribute setters for [Conv](/api_docs/cc/class/tensorflow/ops/conv#classtensorflow_1_1ops_1_1_conv).\n\nSummary\n-------\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------------------------|--------------------------|\n| [batch_dims_](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a9ea9bdd5e248ff009ef531bbfe458e46)` = 1` | `int64` |\n| [data_format_](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1aff55695e98f834da10a285550804803b)` = \"CHANNELS_LAST\"` | `StringPiece` |\n| [dilations_](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a4db909083b6f27df6a69054889526a7b)` = {}` | `gtl::ArraySlice\u003c int \u003e` |\n| [explicit_paddings_](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a465c3aa7dc1f13dedb38a57ff159bd19)` = {}` | `gtl::ArraySlice\u003c int \u003e` |\n| [groups_](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a3c434b7123f5e61eefd679a18acbfa71)` = 1` | `int64` |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [BatchDims](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1ab5b8710f807f79223170880f93680a2d)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs) A positive integer specifying the number of batch dimensions for the input tensor. |\n| [DataFormat](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a804484932bce8c99d7845a8896aa8205)`(StringPiece x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs) Used to set the data format. |\n| [Dilations](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a82a108d5827ee742f96fc944ad7a533f)`(const gtl::ArraySlice\u003c int \u003e & x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs) 1-D tensor of length `N+2`. |\n| [ExplicitPaddings](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a602efcc50b119951e0ed1af441521f28)`(const gtl::ArraySlice\u003c int \u003e & x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs) If `padding` is `\"EXPLICIT\"`, the list of explicit padding amounts. |\n| [Groups](#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a244d82ecbf3be1e1abaf581a15fc546c)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs) A positive integer specifying the number of groups in which the input is split along the channel axis. |\n\nPublic attributes\n-----------------\n\n### batch_dims_\n\n```scdoc\nint64 tensorflow::ops::Conv::Attrs::batch_dims_ = 1\n``` \n\n### data_format_\n\n```scdoc\nStringPiece tensorflow::ops::Conv::Attrs::data_format_ = \"CHANNELS_LAST\"\n``` \n\n### dilations_\n\n```scdoc\ngtl::ArraySlice\u003c int \u003e tensorflow::ops::Conv::Attrs::dilations_ = {}\n``` \n\n### explicit_paddings_\n\n```scdoc\ngtl::ArraySlice\u003c int \u003e tensorflow::ops::Conv::Attrs::explicit_paddings_ = {}\n``` \n\n### groups_\n\n```scdoc\nint64 tensorflow::ops::Conv::Attrs::groups_ = 1\n``` \n\nPublic functions\n----------------\n\n### BatchDims\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::BatchDims(\n int64 x\n)\n``` \nA positive integer specifying the number of batch dimensions for the input tensor.\n\nShould be less than the rank of the input tensor.\n\nDefaults to 1 \n\n### DataFormat\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::DataFormat(\n StringPiece x\n)\n``` \nUsed to set the data format.\n\nBy default `CHANNELS_FIRST`, uses `NHWC (2D) / NDHWC (3D)` or if `CHANNELS_LAST`, uses `NCHW (2D) / NCDHW (3D)`.\n\nDefaults to \"CHANNELS_LAST\" \n\n### Dilations\n\n```gdscript\nTF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::Dilations(\n const gtl::ArraySlice\u003c int \u003e & x\n)\n``` \n1-D tensor of length `N+2`.\n\nThe dilation factor for each dimension of `input`. If set to `k \u003e 1`, there will be `k-1` skipped cells between each filter element on that dimension. The dimension order is determined by the value of `channels_last_format`, see above for details. Dilations in the batch and depth dimensions must be 1.\n\nDefaults to \\[\\] \n\n### ExplicitPaddings\n\n```gdscript\nTF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::ExplicitPaddings(\n const gtl::ArraySlice\u003c int \u003e & x\n)\n``` \nIf `padding` is `\"EXPLICIT\"`, the list of explicit padding amounts.\n\nFor the ith dimension, the amount of padding inserted before and after the dimension is `explicit_paddings[2 * i]` and `explicit_paddings[2 * i + 1]`, respectively. If `padding` is not `\"EXPLICIT\"`, `explicit_paddings` must be empty.\n\nDefaults to \\[\\] \n\n### Groups\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::Groups(\n int64 x\n)\n``` \nA positive integer specifying the number of groups in which the input is split along the channel axis.\n\nEach group is convolved separately with `filters / groups` filters. The output is the concatenation of all the groups results along the channel axis. [Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input) channels and filters must both be divisible by groups.\n\nDefaults to 1"]]