Skip to content

Commit

Permalink
Merge pull request #144 from mattzque/pytorch-1.3.0
Browse files Browse the repository at this point in the history
Support for pytorch 1.3.0 added.
  • Loading branch information
ducksoup authored Nov 22, 2019
2 parents fdd8bd9 + 93b8588 commit 1b91300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inplace_abn_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ std::tuple<at::Tensor, at::Tensor, at::Tensor> statistics_cpu(const at::Tensor&

auto x = normalize_shape(x_);

auto mean = x.mean({0, 2});
auto var = (x - normalize_shape(mean)).pow(2).mean({0, 2});
auto mean = x.mean(c10::IntArrayRef({0, 2}));
auto var = (x - normalize_shape(mean)).pow(2).mean(c10::IntArrayRef({0, 2}));
auto count = at::full({1}, count_samples(x), x.options().dtype(at::ScalarType::Long));

return std::make_tuple(mean, var, count);
Expand Down

0 comments on commit 1b91300

Please sign in to comment.