Deep-Learning-and-Scientific-Computing-with-R-torch icon indicating copy to clipboard operation
Deep-Learning-and-Scientific-Computing-with-R-torch copied to clipboard

Should the reference to 3-shaped tensor in 3.6 Broadcasting rather be to a 5-shaped tensor?

Open karltk opened this issue 1 year ago • 0 comments

In the 3rd to last paragraph in the Broadcasting section, it says

To a tensor of shape 3 x 5, we were able to add both a tensor of shape 3 and a tensor of shape 1 x 5.

However, the code

t3$shape

returns 5, so the use of 3 in the text is a bit confusing. Could it be that you meant to say shape 5 instead of shape 3?

If so, the second item of the final list in the section should also be updated.

If not, perhaps you can elaborate a bit on why you refer to it as shape 3 and not as shape 5?

karltk avatar Dec 28 '23 12:12 karltk