Ignored

Struct Ignored 

pub struct Ignored<T>(pub T);
๐Ÿ‘ŽDeprecated since 0.21.0: Ignored<T> is deprecated. Use #[module(skip)] for non-persistent fields (same behavior).
Expand description

Container to satisfy the Module trait for types that are not modules.

Tuple Fieldsยง

ยง0: T
๐Ÿ‘ŽDeprecated since 0.21.0: Ignored<T> is deprecated. Use #[module(skip)] for non-persistent fields (same behavior).

Trait Implementationsยง

ยง

impl<B, T> AutodiffModule<B> for Ignored<T>
where B: AutodiffBackend, T: Sync + Send + Debug + Clone,

ยง

type InnerModule = Ignored<T>

Inner module without auto-differentiation.
ยง

fn valid(&self) -> <Ignored<T> as AutodiffModule<B>>::InnerModule

Returns the same module, but on the inner backend without auto-differentiation.
ยง

fn from_inner( module: <Ignored<T> as AutodiffModule<B>>::InnerModule, ) -> Ignored<T>

Wraps an inner module back into an auto-diff module.
ยง

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

ยง

fn clone(&self) -> Ignored<T>

Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยง

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

Performs copy-assignment from source. Read more
ยง

impl<T> Debug for Ignored<T>
where T: Debug,

ยง

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

Formats the value using the given formatter. Read more
ยง

impl<T> Deref for Ignored<T>

ยง

type Target = T

The resulting type after dereferencing.
ยง

fn deref(&self) -> &<Ignored<T> as Deref>::Target

Dereferences the value.
ยง

impl<T> Display for Ignored<T>
where T: Sync + Send + Debug + Clone,

ยง

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

Formats the value using the given formatter. Read more
ยง

impl<B, T> Module<B> for Ignored<T>
where B: Backend, T: Sync + Send + Debug + Clone,

ยง

type Record = EmptyRecord

Type to save and load the module.
ยง

fn visit<V>(&self, _visitor: &mut V)
where V: ModuleVisitor<B>,

Visit each tensor parameter in the module with a visitor.
ยง

fn map<M>(self, _mapper: &mut M) -> Ignored<T>
where M: ModuleMapper<B>,

Map each tensor parameter in the module with a mapper.
ยง

fn load_record(self, _record: <Ignored<T> as Module<B>>::Record) -> Ignored<T>

Load the module state from a record.
ยง

fn into_record(self) -> <Ignored<T> as Module<B>>::Record

Convert the module into a record containing the state.
ยง

fn to_device(self, _: &<B as BackendTypes>::Device) -> Ignored<T>

Move the module and all of its sub-modules to the given device. Read more
ยง

fn fork(self, _: &<B as BackendTypes>::Device) -> Ignored<T>

Fork the module and all of its sub-modules to the given device. Read more
ยง

fn collect_devices( &self, devices: Vec<<B as BackendTypes>::Device>, ) -> Vec<<B as BackendTypes>::Device>

Return all the devices found in the underneath module tree added to the given vector without duplicates.
ยง

fn devices(&self) -> Vec<<B as BackendTypes>::Device>

Return all the devices found in the underneath module tree without duplicates.
ยง

fn no_grad(self) -> Self

Each tensor in the module tree will not require grad. Read more
ยง

fn train<AB>(self) -> Self::TrainModule
where AB: AutodiffBackend<InnerBackend = B>, Self: HasAutodiffModule<AB>,

Move the module and all of its sub-modules to the autodiff backend. Read more
ยง

fn num_params(&self) -> usize

Get the number of parameters the module has, including all of its sub-modules.
ยง

fn save_file<FR, PB>( self, file_path: PB, recorder: &FR, ) -> Result<(), RecorderError>
where FR: FileRecorder<B>, PB: Into<PathBuf>,

Save the module to a file using the provided file recorder. Read more
ยง

fn load_file<FR, PB>( self, file_path: PB, recorder: &FR, device: &<B as BackendTypes>::Device, ) -> Result<Self, RecorderError>
where FR: FileRecorder<B>, PB: Into<PathBuf>,

Load the module from a file using the provided file recorder. Read more
ยง

fn quantize_weights(self, quantizer: &mut Quantizer) -> Self

Quantize the weights of the module.
ยง

impl<T> ModuleDisplay for Ignored<T>
where T: Sync + Send + Debug + Clone,

ยง

fn format(&self, passed_settings: DisplaySettings) -> String

Formats the module with provided display settings. Read more
ยง

fn custom_settings(&self) -> Option<DisplaySettings>

Custom display settings for the module. Read more
ยง

fn custom_content(&self, _content: Content) -> Option<Content>

Custom attributes for the module. Read more
ยง

impl<T> ModuleDisplayDefault for Ignored<T>
where T: Sync + Send + Debug + Clone,

ยง

fn content(&self, content: Content) -> Option<Content>

Attributes of the module used for display purposes. Read more
ยง

fn num_params(&self) -> usize

Gets the number of the parameters of the module.

Auto Trait Implementationsยง

ยง

impl<T> Freeze for Ignored<T>
where T: Freeze,

ยง

impl<T> RefUnwindSafe for Ignored<T>
where T: RefUnwindSafe,

ยง

impl<T> Send for Ignored<T>
where T: Send,

ยง

impl<T> Sync for Ignored<T>
where T: Sync,

ยง

impl<T> Unpin for Ignored<T>
where T: Unpin,

ยง

impl<T> UnwindSafe for Ignored<T>
where T: UnwindSafe,

Blanket Implementationsยง

ยง

impl<T> Adaptor<()> for T

ยง

fn adapt(&self)

Adapt the type to be passed to a metric.
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
ยง

impl<C> CloneExpand for C
where C: Clone,

ยง

fn __expand_clone_method(&self, _scope: &mut Scope) -> C

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
ยง

impl<T> Downcast<T> for T

ยง

fn downcast(&self) -> &T

Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

ยง

impl<T> Instrument for T

ยง

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
ยง

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

ยง

impl<T> IntoComptime for T

ยง

fn comptime(self) -> Self

Sourceยง

impl<T> IntoEither for T

Sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
ยง

impl<T> Pointable for T

ยง

const ALIGN: usize

The alignment of pointer.
ยง

type Init = T

The type for initializers.
ยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
ยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
ยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
ยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Sourceยง

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Sourceยง

type Target = T

๐Ÿ”ฌThis is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
ยง

impl<T> ToCompactString for T
where T: Display,

ยง

fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>

Fallible version of [ToCompactString::to_compact_string()] Read more
ยง

fn to_compact_string(&self) -> CompactString

Converts the given value to a [CompactString]. Read more
ยง

impl<T> ToLine for T
where T: Display,

ยง

fn to_line(&self) -> Line<'_>

Converts the value to a [Line].
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
ยง

impl<T> ToSpan for T
where T: Display,

ยง

fn to_span(&self) -> Span<'_>

Converts the value to a [Span].
Sourceยง

impl<T> ToString for T
where T: Display + ?Sized,

Sourceยง

fn to_string(&self) -> String

Converts the given value to a String. Read more
ยง

impl<T> ToText for T
where T: Display,

ยง

fn to_text(&self) -> Text<'_>

Converts the value to a [Text].
Sourceยง

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

Sourceยง

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
ยง

impl<T> TuneInputs for T
where T: Clone + Send + Sync + 'static,

ยง

type At<'a> = T

The concrete input type at lifetime 'a.
ยง

impl<T> Upcast<T> for T

ยง

fn upcast(&self) -> Option<&T>

ยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

ยง

fn vzip(self) -> V

ยง

impl<T> WithSubscriber for T

ยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
ยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
ยง

impl<T> Formattable for T
where T: Deref, <T as Deref>::Target: Formattable,

ยง

impl<T> Parsable for T
where T: Deref, <T as Deref>::Target: Parsable,

ยง

impl<T> WasmNotSend for T
where T: Send,

ยง

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

ยง

impl<T> WasmNotSync for T
where T: Sync,