mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 03:54:56 +00:00
Simplify usage of the pool functions. (#662)
* Simplify usage of the pool functions. * Small tweak. * Attempt at using apply to simplify the convnet definition.
This commit is contained in:
@ -47,7 +47,7 @@ impl Downsample2D {
|
||||
fn forward(&self, xs: &Tensor) -> Result<Tensor> {
|
||||
let _enter = self.span.enter();
|
||||
match &self.conv {
|
||||
None => xs.avg_pool2d((2, 2), (2, 2)),
|
||||
None => xs.avg_pool2d(2),
|
||||
Some(conv) => {
|
||||
if self.padding == 0 {
|
||||
let xs = xs
|
||||
|
Reference in New Issue
Block a user