commit | 3366654fd4492baddf987641f8bb7a3a0b65ea57 | [log] [tgz] |
---|---|---|
author | Sam Gross <sgross@fb.com> | Thu Oct 12 11:22:51 2017 -0700 |
committer | Zachary DeVito <zdevito@gmail.com> | Thu Oct 12 19:52:43 2017 -0700 |
tree | a6671fe58f0d1142eb2994b37360f7d5418a4298 | |
parent | de7e1a9a824135b585a849beedb9a586d6cf09bd [diff] |
Support broadcasting in copy a.copy_(b) will now broadcast b to the shape of a. Note that this means that copies between tensors of the same number of elements but incompatible shapes are not allowed. For example, the following will throw an exception: Tensor a = type.rand({4, 43); Tensor e = type.rand({3, 4}); a.copy_(e)