Skip to content

Commit

Permalink
Torch::resize sizes -> newSizes
Browse files Browse the repository at this point in the history
Summary:
Fix arguments names for Torch::resize method to consistency with other
resize methods.

Test Plan:
$ fbconfig deeplearning/torch
$ fbmake --fast opt

Reviewed By: [email protected]

Subscribers: cpalow, juancarabina, mt-diffs@

FB internal diff: D1656694

Signature: t1:1656694:1415062283:315156e88d2ff42a94a8b1ad707ee913b89f8c2b
  • Loading branch information
urikz authored and soumith committed Dec 31, 2014
1 parent c614ba2 commit b923f36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions thpp/Tensor-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ void Tensor<T>::squeeze(const Tensor& src, int dim) {
}

template <class T>
void Tensor<T>::resize(std::initializer_list<long> sizes,
std::initializer_list<long> strides) {
void Tensor<T>::resize(std::initializer_list<long> newSizes,
std::initializer_list<long> newStrides) {
resize(LongStorage(sizes.begin(), sizes.end()),
LongStorage(strides.begin(), strides.end()));
}
Expand Down
4 changes: 2 additions & 2 deletions thpp/Tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ class Tensor {
void squeeze(int dim) { squeeze(*this, dim); }

void resize(
std::initializer_list<long> sizes,
std::initializer_list<long> strides = std::initializer_list<long>());
std::initializer_list<long> newSizes,
std::initializer_list<long> newStrides = std::initializer_list<long>());
void resize(LongStorage newSizes, LongStorage newStrides = LongStorage());
void resize(LongRange newSizes, LongRange newStrides = LongRange());
void resizeAs(const Tensor& src);
Expand Down

0 comments on commit b923f36

Please sign in to comment.