pub struct IConstantLayer { /* private fields */ }Expand description
IConstantLayer
Layer that represents a constant value.
This layer does not support boolean types.
Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.
Implementations§
Source§impl IConstantLayer
impl IConstantLayer
Sourcepub fn setWeights(self: Pin<&mut IConstantLayer>, weights: Weights)
pub fn setWeights(self: Pin<&mut IConstantLayer>, weights: Weights)
Set the weights for the layer.
The output type is weights.type. If the network is weakly typed and the weights have a real type, the output type might be different per TensorRT’s type conversion rules.
See [getWeights()]
Sourcepub fn getWeights(self: &IConstantLayer) -> Weights
pub fn getWeights(self: &IConstantLayer) -> Weights
Get the weights for the layer.
See [setWeights]
Sourcepub fn setDimensions(self: Pin<&mut IConstantLayer>, dimensions: &Dims64)
pub fn setDimensions(self: Pin<&mut IConstantLayer>, dimensions: &Dims64)
Set the dimensions for the layer.
dimensionsThe dimensions of the layer
See [setDimensions]
Sourcepub fn getDimensions(self: &IConstantLayer) -> Dims64
pub fn getDimensions(self: &IConstantLayer) -> Dims64
Get the dimensions for the layer.
the dimensions for the layer
See [getDimensions]
Trait Implementations§
Source§impl AsLayer for IConstantLayer
impl AsLayer for IConstantLayer
Source§impl AsLayerTyped for IConstantLayer
impl AsLayerTyped for IConstantLayer
Source§impl AsRef<ILayer> for IConstantLayer
impl AsRef<ILayer> for IConstantLayer
Source§fn as_ref(self: &IConstantLayer) -> &ILayer
fn as_ref(self: &IConstantLayer) -> &ILayer
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl ExternType for IConstantLayer
impl ExternType for IConstantLayer
Source§impl MakeCppStorage for IConstantLayer
impl MakeCppStorage for IConstantLayer
Source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut IConstantLayer
unsafe fn allocate_uninitialized_cpp_storage() -> *mut IConstantLayer
Allocates heap space for this type in C++ and return a pointer
to that space, but do not initialize that space (i.e. do not
yet call a constructor). Read more
Source§unsafe fn free_uninitialized_cpp_storage(arg0: *mut IConstantLayer)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut IConstantLayer)
Frees a C++ allocation which has not yet
had a constructor called. Read more
Auto Trait Implementations§
impl !Freeze for IConstantLayer
impl !RefUnwindSafe for IConstantLayer
impl !Send for IConstantLayer
impl !Sync for IConstantLayer
impl Unpin for IConstantLayer
impl UnsafeUnpin for IConstantLayer
impl UnwindSafe for IConstantLayer
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