pytorch / pytorch/tutorials

Feedback about Tensors

Open
#3,759 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question Tensors
Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

There is the following issue on this page: https://docs.pytorch.org/tutorials/beginner/basics/tensorqs_tutorial.html
y1 = tensor @ tensor.T
y2 = tensor.matmul(tensor.T)
y3 = torch.rand_like(y1)

torch.matmul(tensor, tensor.T, out = y3)
print(y3)

结果是这个
tensor([[3., 3., 3., 3.],
[3., 3., 3., 3.],
[3., 3., 3., 3.],
[3., 3., 3., 3.]])

但是网页给出的结果是
tensor([[1., 0., 1., 1.],
[1., 0., 1., 1.],
[1., 0., 1., 1.],
[1., 0., 1., 1.]])

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the tensor tutorial at docs.pytorch.org/tutorials/beginner/basics/tensorqs_tutorial.html and inspect the tensor matrix-multiplication example and its displayed output. Reproduce the example with the same tensor initialization and compare the result with the report; done means the example and expected output agree, or the discrepancy is explained and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.