Skip to content

Commit

Permalink
deprecation arnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kali committed Mar 2, 2022
1 parent 1b7b9c7 commit 92b5ead
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/ops/cnn/conv/proptest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ impl ConvProblem {
}

fn reference(&self) -> ArrayD<f32> {
use num_integer::Integer;
setup_test_logger();
assert_eq!(self.data.shape(), &*self.shape_in.shape, "inconsistent shapes in test");
let n = *self.shape_in.n().clone().unwrap_or(&1);
Expand All @@ -37,14 +36,14 @@ impl ConvProblem {
let (shape_out, left_pads): (TVec<_>, TVec<_>) = if self.pad == PaddingSpec::Valid {
izip!(self.shape_in.hw_dims(), self.geo_ker(), &self.strides)
.map(|(i, k, s)| {
let out = (*i + 1).saturating_sub(*k).div_ceil(&s);
let out = (*i + 1).saturating_sub(*k).divceil(*s);
(out, 0)
})
.unzip()
} else {
izip!(self.shape_in.hw_dims(), self.geo_ker(), &self.strides)
.map(|(input, k, stride)| {
let out = input.div_ceil(stride);
let out = input.divceil(*stride);
let pad = ((out - 1) * stride + k).saturating_sub(*input);
(out, pad / 2)
})
Expand Down

0 comments on commit 92b5ead

Please sign in to comment.