pub trait CustomLayer: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn layer_type(&self) -> &str;
fn input_shape(&self) -> Vec<i64>;
fn output_shape(&self, input_shape: &[i64]) -> Vec<i64>;
fn initialize_parameters(&self) -> Result<HashMap<String, TensorRef>>;
fn config(&self) -> Value;
}Expand description
Custom layer interface for advanced builders
Required Methods§
Sourcefn layer_type(&self) -> &str
fn layer_type(&self) -> &str
Get layer type
Sourcefn input_shape(&self) -> Vec<i64>
fn input_shape(&self) -> Vec<i64>
Get input shape requirements
Sourcefn output_shape(&self, input_shape: &[i64]) -> Vec<i64>
fn output_shape(&self, input_shape: &[i64]) -> Vec<i64>
Get output shape