Trait ktensor::Graph
[−]
[src]
pub trait Graph<T> where
T: Copy, { fn get_id(&self) -> String; fn get_dim(&self) -> Vec2; fn run(&self, state: &Context<T>, variable: &Context<T>) -> Tensor<T>; fn forward_pass(
&self,
state: &Context<T>,
variable: &Context<T>,
history: &mut Context<T>
) -> Tensor<T>; fn backward_pass(
&self,
state: &mut Context<T>,
variable: &Context<T>,
history: &Context<T>,
gradient: &Tensor<T>,
learning_rate: T
); fn train(
&self,
state: &Context<T>,
variable: &Context<T>,
history: &mut Context<T>
) -> Tensor<T> { ... } }
Required Methods
fn get_id(&self) -> String
fn get_dim(&self) -> Vec2
fn run(&self, state: &Context<T>, variable: &Context<T>) -> Tensor<T>
fn forward_pass(
&self,
state: &Context<T>,
variable: &Context<T>,
history: &mut Context<T>
) -> Tensor<T>
&self,
state: &Context<T>,
variable: &Context<T>,
history: &mut Context<T>
) -> Tensor<T>
fn backward_pass(
&self,
state: &mut Context<T>,
variable: &Context<T>,
history: &Context<T>,
gradient: &Tensor<T>,
learning_rate: T
)
&self,
state: &mut Context<T>,
variable: &Context<T>,
history: &Context<T>,
gradient: &Tensor<T>,
learning_rate: T
)