#[repr(i32)]pub enum NeuralNetworkImageShapeMapping {
Rank5ImageMapping = 0,
Rank4ImageMapping = 1,
}Variants§
Rank5ImageMapping = 0
In this case, image input is mapped to a rank 5 tensor. For Color images, input tensor is shaped as [1,1,3,H,W]. For Gray images, input tensor is shaped as [1,1,1,H,W].
Rank4ImageMapping = 1
For Color images, input tensor is shaped as [1,3,H,W]. For Gray images, input tensor is shaped as [1,1,H,W]. Supported only for Specification version >= 4 (iOS >= 13, macOS >= 10.15).
Implementations§
Source§impl NeuralNetworkImageShapeMapping
impl NeuralNetworkImageShapeMapping
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of NeuralNetworkImageShapeMapping.
Sourcepub fn from_i32(value: i32) -> Option<NeuralNetworkImageShapeMapping>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<NeuralNetworkImageShapeMapping>
Use the TryFrom<i32> implementation instead
Converts an i32 to a NeuralNetworkImageShapeMapping, or None if value is not a valid variant.
Source§impl NeuralNetworkImageShapeMapping
impl NeuralNetworkImageShapeMapping
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 NeuralNetworkImageShapeMapping
impl Clone for NeuralNetworkImageShapeMapping
Source§fn clone(&self) -> NeuralNetworkImageShapeMapping
fn clone(&self) -> NeuralNetworkImageShapeMapping
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 NeuralNetworkImageShapeMapping
impl Default for NeuralNetworkImageShapeMapping
Source§fn default() -> NeuralNetworkImageShapeMapping
fn default() -> NeuralNetworkImageShapeMapping
Source§impl From<NeuralNetworkImageShapeMapping> for i32
impl From<NeuralNetworkImageShapeMapping> for i32
Source§fn from(value: NeuralNetworkImageShapeMapping) -> i32
fn from(value: NeuralNetworkImageShapeMapping) -> i32
Source§impl Ord for NeuralNetworkImageShapeMapping
impl Ord for NeuralNetworkImageShapeMapping
Source§fn cmp(&self, other: &NeuralNetworkImageShapeMapping) -> Ordering
fn cmp(&self, other: &NeuralNetworkImageShapeMapping) -> 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 NeuralNetworkImageShapeMapping
impl PartialEq for NeuralNetworkImageShapeMapping
Source§fn eq(&self, other: &NeuralNetworkImageShapeMapping) -> bool
fn eq(&self, other: &NeuralNetworkImageShapeMapping) -> bool
self and other values to be equal, and is used by ==.