Created
September 29, 2018 22:41
-
-
Save goldsborough/265a13be401578611d56a9cd4cdf12f6 to your computer and use it in GitHub Desktop.
Revisions
-
goldsborough created this gist
Sep 29, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ - Old-style factory functions that accept a type as first argument and size as second argument have been removed. New-style factory functions accepting the size as first argument and [`TensorOptions`](https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/core/TensorOptions.h#L14) as last argument should be used instead. For example, replace your call e.g. to `at::ones(torch::CPU(at::kFloat)), {2, 3})` with `torch::ones({2, 3}, at::kCPU)`. This applies to the following functions: - `arange` - `empty` - `eye` - `full` - `linspace` - `logspace` - `ones` - `rand` - `randint` - `randn` - `randperm` - `range` - `zeros` We have [improved online documentation](https://pytorch.org/cppdocs) of our C++ APIs. Authors of C++ extensions may want to consult this documentation when writing new extensions.