pub struct GatherDimensionNumbers {
pub offset_dims: Vec<i64>,
pub collapsed_slice_dims: Vec<i64>,
pub start_index_map: Vec<i64>,
pub index_vector_dim: i64,
pub operand_batching_dims: Vec<i64>,
pub start_indices_batching_dims: Vec<i64>,
}Expand description
Describes the dimension numbers for a gather operation.
See https://www.tensorflow.org/performance/xla/operation_semantics#gather for more details.
Fields§
§offset_dims: Vec<i64>“Window indices” is a term for a set of indices that index into the interior of a dynamic-slice from the input tensor, the starting indices for which were computed from output_gather_dims (see the operation semantic for how this is defined) and the start_indices tensor.
The window indices for a specific output index Out is computed as:
i = 0 for (k : [0, input_tensor_shape.rank)) window_indices[k] = if k in collapsed_slice_dims then 0 else Out[offset_dims[i++]]
collapsed_slice_dims: Vec<i64>§start_index_map: Vec<i64>This is interpreted as a map from i to start_index_map[i]. It transforms the gather index looked up from the start_indices tensor into the starting index in the input space.
index_vector_dim: i64The dimension in the start_indices input that contains the starting indices.
operand_batching_dims: Vec<i64>This is the batch dimensions in the operand.
start_indices_batching_dims: Vec<i64>This is the batch dimensions in the index, and it should be the same size as operand_batching_dims.
Trait Implementations§
Source§impl Clone for GatherDimensionNumbers
impl Clone for GatherDimensionNumbers
Source§fn clone(&self) -> GatherDimensionNumbers
fn clone(&self) -> GatherDimensionNumbers
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GatherDimensionNumbers
impl Debug for GatherDimensionNumbers
Source§impl Default for GatherDimensionNumbers
impl Default for GatherDimensionNumbers
Source§impl Message for GatherDimensionNumbers
impl Message for GatherDimensionNumbers
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for GatherDimensionNumbers
impl PartialEq for GatherDimensionNumbers
impl StructuralPartialEq for GatherDimensionNumbers
Auto Trait Implementations§
impl Freeze for GatherDimensionNumbers
impl RefUnwindSafe for GatherDimensionNumbers
impl Send for GatherDimensionNumbers
impl Sync for GatherDimensionNumbers
impl Unpin for GatherDimensionNumbers
impl UnwindSafe for GatherDimensionNumbers
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)