文章来自于翻译https://pytorch.org/docs/stable/tensors.html,想自己学习,可以参考原文
1.torch.tensor 是一个包含一种数据的多维矩阵。
2.new_full
(size, fill_value, dtype=None, device=None, requires_grad=False) → Tensor
Returns a Tensor of size size
filled with fill_value
. By default, the returned Tensor has the same torch.dtype
and torch.device
as this tensor.
3.new_tensor
(data, dtype=None, device=None, requires_grad=False) → Tensor