Skip to content

Commit

Permalink
Update Sequential to implement forward_t instead of forward.
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoppel authored Dec 31, 2023
1 parent cf51ea7 commit 66531aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions candle-nn/src/sequential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ impl Sequential {
}

impl Module for Sequential {
fn forward(&self, xs: &Tensor) -> Result<Tensor> {
fn forward_t(&self, xs: &Tensor, train: bool) -> Result<Tensor> {
let mut xs = xs.clone();
for layer in self.layers.iter() {
xs = layer.forward(&xs)?
xs = layer.forward_t(&xs, train)?;
}
Ok(xs)
}
Expand Down

0 comments on commit 66531aa

Please sign in to comment.