标签: tensor
共找到 2 篇相关文章
第 1 页,共 1 页
文章预览
How to check the shape of a PyTorch tensor?
2023年08月22日
279 字
To check the shape of a PyTorch tensor, you can use the `.shape` or `.size()` attribute. Here is an example: ``` import torch # Create a PyTorch tensor x = torch.tensor([[1, 2…
阅读全文
浏览
评论