pub trait TFQLayer: Send + Sync {
// Required methods
fn forward(&self, inputs: &ArrayD<f64>) -> Result<ArrayD<f64>>;
fn backward(&self, upstream_gradients: &ArrayD<f64>) -> Result<ArrayD<f64>>;
fn get_parameters(&self) -> Vec<Array1<f64>> ⓘ;
fn set_parameters(&mut self, params: Vec<Array1<f64>>) -> Result<()>;
fn name(&self) -> &str;
}Expand description
TensorFlow Quantum layer trait
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".