pub trait Parameter:
Clone
+ Debug
+ Send {
type Device: Clone;
// Required methods
fn device(&self) -> Self::Device;
fn is_require_grad(&self) -> bool;
fn set_require_grad(self, require_grad: bool) -> Self;
}
Expand description
Trait that defines what is necessary for a type to be a parameter.
Required Associated Types§
Required Methods§
fn is_require_grad(&self) -> bool
fn is_require_grad(&self) -> bool
Fetch the gradient requirement.
fn set_require_grad(self, require_grad: bool) -> Self
fn set_require_grad(self, require_grad: bool) -> Self
Set the gradient requirement.
Object Safety§
This trait is not object safe.