pub trait Reparameterization:
AutodiffModule
+ Sync
+ 'static {
const NAME: &'static str;
// Required method
fn materialize<const D: usize>(&self, base: Tensor<D>) -> Tensor<D>;
}Expand description
A rank-specific parameter reparameterization.
Implementations are regular Modules, so their parameters automatically participate in
optimizer, record, device and autodiff traversal. The implementation only needs to describe
how its state materializes an effective value from the stored base parameter.
Required Associated Constants§
Required Methods§
Sourcefn materialize<const D: usize>(&self, base: Tensor<D>) -> Tensor<D>
fn materialize<const D: usize>(&self, base: Tensor<D>) -> Tensor<D>
Materialize the effective parameter value from its stored base.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".