Skip to content

Commit

Permalink
clip
Browse files Browse the repository at this point in the history
  • Loading branch information
kali committed Jul 11, 2023
1 parent 3af0e7f commit dc32e4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/ops/cnn/padding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ impl PaddingSpec {
if ceil_mode {
// ensure that the last pooling starts inside the image
// needed to avoid problems in ceil mode
if (output - 1) * stride >= input.clone() + bef {
if (output - 1) * stride >= input + bef {
output -= 1;
}
}
let after = (output * stride) + kernel_field - 1 - input - bef;
ComputedPaddedDim::new(input.clone(), output, bef.into(), after.into())
ComputedPaddedDim::new(input, output, bef, after)
}

fn explicit_for_deconv<D: DimLike>(
Expand Down

0 comments on commit dc32e4e

Please sign in to comment.