#[repr(i32)]pub enum NeuralNetworkMultiArrayShapeMapping {
Rank5ArrayMapping = 0,
ExactArrayMapping = 1,
}Variants§
Rank5ArrayMapping = 0
Default legacy value. Only supported for Core ML Specification version <= 3.
The default legacy shape mapping resolves all input shapes to a rank 5 equivalent with axis notation of [Seq, Batch, Channel, Height, Width].
When this enum value is selected, the repeated shape field in the message “ArrayFeatureType” in feature types proto, must be either length 1 or length 3.
The following rule is used to map the values in the shape field to the actual tensor shape: rank 1 shape is mapped to shape [1,1,C,1,1] rank 3 shape is mapped to shape [1,1,C,H,W] At runtime, the first two dimensions (Seq or Batch) can be presented as well, with non-1 values.
It is invalid to use this enum value if any of the layers added Specification version 4 (iOS >= 13, macOS >= 10.15) onwards are used in the network. Validator will raise an error in that case.
ExactArrayMapping = 1
The exact shape and rank (i.e. number of dimensions in the shape) of the input, as specified in the message “ArrayFeatureType”, is passed through to the layers. Supported only for Specification version >= 4 (iOS >= 13, macOS >= 10.15).
Implementations§
Source§impl NeuralNetworkMultiArrayShapeMapping
impl NeuralNetworkMultiArrayShapeMapping
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of NeuralNetworkMultiArrayShapeMapping.
Sourcepub fn from_i32(value: i32) -> Option<NeuralNetworkMultiArrayShapeMapping>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<NeuralNetworkMultiArrayShapeMapping>
Use the TryFrom<i32> implementation instead
Converts an i32 to a NeuralNetworkMultiArrayShapeMapping, or None if value is not a valid variant.
Source§impl NeuralNetworkMultiArrayShapeMapping
impl NeuralNetworkMultiArrayShapeMapping
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for NeuralNetworkMultiArrayShapeMapping
impl Clone for NeuralNetworkMultiArrayShapeMapping
Source§fn clone(&self) -> NeuralNetworkMultiArrayShapeMapping
fn clone(&self) -> NeuralNetworkMultiArrayShapeMapping
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for NeuralNetworkMultiArrayShapeMapping
impl Default for NeuralNetworkMultiArrayShapeMapping
Source§fn default() -> NeuralNetworkMultiArrayShapeMapping
fn default() -> NeuralNetworkMultiArrayShapeMapping
Source§impl From<NeuralNetworkMultiArrayShapeMapping> for i32
impl From<NeuralNetworkMultiArrayShapeMapping> for i32
Source§fn from(value: NeuralNetworkMultiArrayShapeMapping) -> i32
fn from(value: NeuralNetworkMultiArrayShapeMapping) -> i32
Source§impl Ord for NeuralNetworkMultiArrayShapeMapping
impl Ord for NeuralNetworkMultiArrayShapeMapping
Source§fn cmp(&self, other: &NeuralNetworkMultiArrayShapeMapping) -> Ordering
fn cmp(&self, other: &NeuralNetworkMultiArrayShapeMapping) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NeuralNetworkMultiArrayShapeMapping
impl PartialEq for NeuralNetworkMultiArrayShapeMapping
Source§fn eq(&self, other: &NeuralNetworkMultiArrayShapeMapping) -> bool
fn eq(&self, other: &NeuralNetworkMultiArrayShapeMapping) -> bool
self and other values to be equal, and is used by ==.