Skip to main content

LayerInfo

Struct LayerInfo 

Source
pub struct LayerInfo {
Show 19 fields pub name: String, pub kind: String, pub typeindex: i32, pub bottom_shapes: Vec<ShapeInfo>, pub top_shapes: Vec<ShapeInfo>, pub bottoms: usize, pub tops: usize, pub support_vulkan: bool, pub support_vulkan_packing: bool, pub support_packing: bool, pub support_fp16_storage: bool, pub support_bf16_storage: bool, pub one_blob_only: bool, pub support_inplace: bool, pub support_any_packing: bool, pub support_vulkan_any_packing: bool, pub support_int8_storage: bool, pub support_tensor_storage: bool, pub support_batch: bool,
}
Expand description

One layer of a loaded network.

The support flags are ncnn’s declarations for that layer type, which is where the runtime fallback decision starts: a layer without support_vulkan runs on the CPU even when the network uses a device. They describe the layer type, not a promise about the selected kernel.

Fields§

§name: String

Layer name from the parameter text.

§kind: String

Registered layer type, such as Convolution.

§typeindex: i32

Registered type index.

§bottom_shapes: Vec<ShapeInfo>

Shapes this layer recorded for its inputs, in bottom order.

§top_shapes: Vec<ShapeInfo>

Shapes this layer recorded for its outputs, in top order.

§bottoms: usize

Number of bottom blobs the layer reads.

§tops: usize

Number of top blobs the layer writes.

§support_vulkan: bool

Declares a Vulkan implementation.

§support_vulkan_packing: bool

Declares Vulkan support for packed layouts.

§support_packing: bool

Declares support for packed CPU layouts.

§support_fp16_storage: bool

Declares support for FP16 storage.

§support_bf16_storage: bool

Declares support for BF16 storage.

§one_blob_only: bool

Reads exactly one bottom blob.

§support_inplace: bool

Computes in place on its input blob.

§support_any_packing: bool

Accepts a bottom blob whose layout has any element packing.

§support_vulkan_any_packing: bool

Accepts any element packing on a device.

§support_int8_storage: bool

Accepts INT8 storage.

§support_tensor_storage: bool

Accepts the shader tensor storage layout.

§support_batch: bool

Accepts a batch count above one.

Trait Implementations§

Source§

impl Clone for LayerInfo

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LayerInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for LayerInfo

Source§

impl PartialEq for LayerInfo

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LayerInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.