Package onnx

Interface Onnx.SparseTensorProtoOrBuilder

  • All Superinterfaces:
    org.nd4j.shade.protobuf.MessageLiteOrBuilder, org.nd4j.shade.protobuf.MessageOrBuilder
    All Known Implementing Classes:
    Onnx.SparseTensorProto, Onnx.SparseTensorProto.Builder
    Enclosing class:
    Onnx

    public static interface Onnx.SparseTensorProtoOrBuilder
    extends org.nd4j.shade.protobuf.MessageOrBuilder
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long getDims​(int index)
      The shape of the underlying dense-tensor: [dim_1, dim_2, ...
      int getDimsCount()
      The shape of the underlying dense-tensor: [dim_1, dim_2, ...
      List<Long> getDimsList()
      The shape of the underlying dense-tensor: [dim_1, dim_2, ...
      Onnx.TensorProto getIndices()
      The indices of the non-default values, which may be stored in one of two formats.
      Onnx.TensorProtoOrBuilder getIndicesOrBuilder()
      The indices of the non-default values, which may be stored in one of two formats.
      Onnx.TensorProto getValues()
      The sequence of non-default values are encoded as a tensor of shape [NNZ].
      Onnx.TensorProtoOrBuilder getValuesOrBuilder()
      The sequence of non-default values are encoded as a tensor of shape [NNZ].
      boolean hasIndices()
      The indices of the non-default values, which may be stored in one of two formats.
      boolean hasValues()
      The sequence of non-default values are encoded as a tensor of shape [NNZ].
      • Methods inherited from interface org.nd4j.shade.protobuf.MessageLiteOrBuilder

        isInitialized
      • Methods inherited from interface org.nd4j.shade.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • hasValues

        boolean hasValues()
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
        Returns:
        Whether the values field is set.
      • getValues

        Onnx.TensorProto getValues()
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
        Returns:
        The values.
      • getValuesOrBuilder

        Onnx.TensorProtoOrBuilder getValuesOrBuilder()
         The sequence of non-default values are encoded as a tensor of shape [NNZ].
         The default-value is zero for numeric tensors, and empty-string for string tensors.
         values must have a non-empty name present which serves as a name for SparseTensorProto
         when used in sparse_initializer list.
         
        .onnx.TensorProto values = 1;
      • hasIndices

        boolean hasIndices()
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
        Returns:
        Whether the indices field is set.
      • getIndices

        Onnx.TensorProto getIndices()
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
        Returns:
        The indices.
      • getIndicesOrBuilder

        Onnx.TensorProtoOrBuilder getIndicesOrBuilder()
         The indices of the non-default values, which may be stored in one of two formats.
         (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value
         corresponding to the j-th index of the i-th value (in the values tensor).
         (b) Indices can be a tensor of shape [NNZ], in which case the i-th value
         must be the linearized-index of the i-th value (in the values tensor).
         The linearized-index can be converted into an index tuple (k_1,...,k_rank)
         using the shape provided below.
         The indices must appear in ascending order without duplication.
         In the first format, the ordering is lexicographic-ordering:
         e.g., index-value [1,4] must appear before [2,1]
         
        .onnx.TensorProto indices = 2;
      • getDimsList

        List<Long> getDimsList()
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Returns:
        A list containing the dims.
      • getDimsCount

        int getDimsCount()
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Returns:
        The count of dims.
      • getDims

        long getDims​(int index)
         The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank]
         
        repeated int64 dims = 3;
        Parameters:
        index - The index of the element to return.
        Returns:
        The dims at the given index.