After updating to PyTorch 1.0, I have noticed many deprecated functions in the ATen library. I cannot find any resources on the correct way to create a new tensor.
Here is how I would create a new tensor on the CPU using an input’s type:
at::Tensor grad_input = at::zeros({batch_size, n_points, 3}, torch::CPU(input.dtype()));
This line throws an error when compiling:
cpp/chamfer_distance.cpp:95:90: error: cannot convert ‘caffe2::TypeMeta’ to ‘c10::ScalarType’ for argument ‘1’ to ‘at::TypeExtendedInterface& torch::CPU(c10::ScalarType)’
at::Tensor grad_input = at::zeros({batch_size, n_points, 3}, torch::CPU(input.dtype()));
How should I create tensors with ATen in PyTorch 1.0?