mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 19:18:50 +00:00
Allow for different behavior between training and eval (#1213)
* Forward with training. * Do not use dropout on vgg evaluation.
This commit is contained in:
@ -84,6 +84,12 @@ impl Dropout {
|
||||
}
|
||||
}
|
||||
|
||||
impl candle::ModuleT for Dropout {
|
||||
fn forward_t(&self, xs: &Tensor, train: bool) -> Result<Tensor> {
|
||||
self.forward(xs, train)
|
||||
}
|
||||
}
|
||||
|
||||
struct SoftmaxLastDim;
|
||||
|
||||
impl candle::CustomOp1 for SoftmaxLastDim {
|
||||
|
Reference in New Issue
Block a user