#[repr(C)]pub struct Weights {
pub type_: DataType,
pub values: *const c_void,
pub count: i64,
}Expand description
Weights
An array of weights used as a layer parameter.
When using the DLA, the cumulative size of all Weights used in a network must be less than 512MB in size. If the build option kGPU_FALLBACK is specified, then multiple DLA sub-networks may be generated from the single original network.
The weights are held by reference until the engine has been built. Therefore the data referenced by values field should be preserved until the build is complete.
The term “empty weights” refers to Weights with weight coefficients ( count == 0 and values == nullptr).
Fields§
§type_: DataType< The type of the weights.
values: *const c_void< The weight values, in a contiguous array.
count: i64< The number of weights in the array.
Implementations§
Trait Implementations§
Source§impl ExternType for Weights
impl ExternType for Weights
Source§impl MakeCppStorage for Weights
impl MakeCppStorage for Weights
impl UniquePtrTarget for Weights
impl VectorElement for Weights
impl WeakPtrTarget for Weights
Auto Trait Implementations§
impl !Send for Weights
impl !Sync for Weights
impl Freeze for Weights
impl RefUnwindSafe for Weights
impl Unpin for Weights
impl UnsafeUnpin for Weights
impl UnwindSafe for Weights
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more