pub struct Linear<B: Backend> { /* private fields */ }
Expand description

Applies a linear transformation to the input tensor:

O = IW + b

Implementations

Trait Implementations

Get the same module, but on the inner backend without auto-differentiation.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The forward method mapping the input to the output.
Get the device list of the module and all of its sub-modules.
Move the module and all of its sub-modules to the given device.
Get the module state.
Load the module state.
Get the number of parameters the module has, including all of its sub-modules.
Update the module parameters with the given gradients and optimizer.
Load the optimizer state for the module, including all of its sub-modules. Read more
Register the optimizer state for the module, including all of its sub-modules. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.