Trait border_tch_agent::model::SubModel
source · [−]pub trait SubModel {
type Config;
type Input;
type Output;
fn build(var_store: &VarStore, config: Self::Config) -> Self;
fn clone_with_var_store(&self, var_store: &VarStore) -> Self;
fn forward(&self, input: &Self::Input) -> Self::Output;
}Expand description
Neural network model that can be initialized with VarStore and configuration.
The purpose of this trait is for modularity of neural network models. Modules, which consists a neural network, should share VarStore. To do this, structs implementing this trait can be initialized with a given VarStore. This trait also provide the ability to clone with a given VarStore. The ability is useful when creating a target network, used in recent deep learning algorithms in common.
Associated Types
Required methods
Builds SubModel with VarStore and SubModel::Config.