mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: This PR reverts https://github.com/pytorch/pytorch/pull/54414 because of https://github.com/pytorch/pytorch/issues/55780 cc ysiraichi Pull Request resolved: https://github.com/pytorch/pytorch/pull/55831 Reviewed By: agolynski Differential Revision: D27762264 Pulled By: heitorschueroff fbshipit-source-id: 8079a660cc440cafb9d22aa031d36dde121e13b3
This commit is contained in:
parent
b940516061
commit
33159b68a3
|
|
@ -176,11 +176,6 @@ Tensor class reference
|
|||
- To create a tensor with similar type but different size as another tensor,
|
||||
use ``tensor.new_*`` creation ops.
|
||||
|
||||
.. warning::
|
||||
The :class:`torch.Tensor` constructor is deprecated. Instead, consider using:
|
||||
:func:`torch.tensor` for creating tensors from tensor-like objects (e.g. lists and tuples);
|
||||
or :func:`torch.empty` for creating uninitialized tensors with specific sizes (e.g. int).
|
||||
|
||||
.. autoattribute:: Tensor.T
|
||||
|
||||
.. autosummary::
|
||||
|
|
|
|||
|
|
@ -473,11 +473,6 @@ Tensor legacy_tensor_ctor(c10::DispatchKey dispatch_key, at::ScalarType scalar_t
|
|||
return legacy_sparse_tensor_ctor(dispatch_key, scalar_type, args, kwargs);
|
||||
}
|
||||
|
||||
TORCH_WARN_ONCE(
|
||||
"Legacy tensor constructor is deprecated. "
|
||||
"Use: torch.tensor(...) for creating tensors from tensor-like objects; "
|
||||
"or torch.empty(...) for creating an uninitialized tensor with specific sizes.");
|
||||
|
||||
ParsedArgs<2> parsed_args;
|
||||
auto r = parser.parse(args, kwargs, parsed_args);
|
||||
if (r.idx == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user