W3cubDocs

/TensorFlow C++

tensorflow::ops::StridedSlice::Attrs

#include <array_ops.h>

Optional attribute setters for StridedSlice.

Summary

Public attributes
begin_mask_ = 0
int64
ellipsis_mask_ = 0
int64
end_mask_ = 0
int64
new_axis_mask_ = 0
int64
shrink_axis_mask_ = 0
int64
Public functions
BeginMask(int64 x)
TF_MUST_USE_RESULT Attrs
a bitmask where a bit i being 1 means to ignore the begin value and instead use the largest interval possible.
EllipsisMask(int64 x)
TF_MUST_USE_RESULT Attrs
a bitmask where bit i being 1 means the ith position is actually an ellipsis.
EndMask(int64 x)
TF_MUST_USE_RESULT Attrs
analogous to begin_mask
NewAxisMask(int64 x)
TF_MUST_USE_RESULT Attrs
a bitmask where bit i being 1 means the ith specification creates a new shape 1 dimension.
ShrinkAxisMask(int64 x)
TF_MUST_USE_RESULT Attrs
a bitmask where bit i implies that the ith specification should shrink the dimensionality.

Public attributes

begin_mask_

int64 tensorflow::ops::StridedSlice::Attrs::begin_mask_ = 0

ellipsis_mask_

int64 tensorflow::ops::StridedSlice::Attrs::ellipsis_mask_ = 0

end_mask_

int64 tensorflow::ops::StridedSlice::Attrs::end_mask_ = 0

new_axis_mask_

int64 tensorflow::ops::StridedSlice::Attrs::new_axis_mask_ = 0

shrink_axis_mask_

int64 tensorflow::ops::StridedSlice::Attrs::shrink_axis_mask_ = 0

Public functions

BeginMask

TF_MUST_USE_RESULT Attrs tensorflow::ops::StridedSlice::Attrs::BeginMask(
  int64 x
)

a bitmask where a bit i being 1 means to ignore the begin value and instead use the largest interval possible.

At runtime begin[i] will be replaced with [0, n-1) ifstride[i] > 0or [-1, n-1]ifstride[i] < 0`

Defaults to 0

EllipsisMask

TF_MUST_USE_RESULT Attrs tensorflow::ops::StridedSlice::Attrs::EllipsisMask(
  int64 x
)

a bitmask where bit i being 1 means the ith position is actually an ellipsis.

One bit at most can be 1. If ellipsis_mask == 0, then an implicit ellipsis mask of 1 << (m+1) is provided. This means that foo[3:5] == foo[3:5, ...]. An ellipsis implicitly creates as many range specifications as necessary to fully specify the sliced range for every dimension. For example for a 4-dimensional tensor foo the slice foo[2, ..., 5:8] implies foo[2, :, :, 5:8].

Defaults to 0

EndMask

TF_MUST_USE_RESULT Attrs tensorflow::ops::StridedSlice::Attrs::EndMask(
  int64 x
)

analogous to begin_mask

Defaults to 0

NewAxisMask

TF_MUST_USE_RESULT Attrs tensorflow::ops::StridedSlice::Attrs::NewAxisMask(
  int64 x
)

a bitmask where bit i being 1 means the ith specification creates a new shape 1 dimension.

For example foo[:4, tf.newaxis, :2] would produce a shape (4, 1, 2) tensor.

Defaults to 0

ShrinkAxisMask

TF_MUST_USE_RESULT Attrs tensorflow::ops::StridedSlice::Attrs::ShrinkAxisMask(
  int64 x
)

a bitmask where bit i implies that the ith specification should shrink the dimensionality.

begin and end must imply a slice of size 1 in the dimension. For example in python one might do foo[:, 3, :] which would result in shrink_axis_mask being 2.

Defaults to 0

© 2018 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/ops/strided-slice/attrs.html