Skip to content

Commit

Permalink
Tensor dims() -> sizes() (caffe2/operators) - 5/5 (pytorch#13032)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#13032

Codemod generated with clangr shard mode, 25 files per diff, for renaming dims() to sizes()

Reviewed By: ezyang

Differential Revision: D10476235

fbshipit-source-id: 263ad75689d864b414dae63cb9a30cb3285dae31
  • Loading branch information
jerryzh168 authored and facebook-github-bot committed Oct 24, 2018
1 parent cccd457 commit 2ac7b6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caffe2/operators/weighted_sample_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ bool WeightedSampleOp<float, CPUContext>::RunOnDevice() {
if (InputSize() == 2) {
auto& values = Input(1);
CAFFE_ENFORCE_EQ(
weights.dims(),
values.dims(),
weights.sizes(),
values.sizes(),
"The sampling weights tensor and the sampling values tensor must have the same dimensions.");
mat_values = values.template data<float>();
auto* out_value = Output(1);
Expand Down

0 comments on commit 2ac7b6b

Please sign in to comment.