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