Error on page 376 #203
baifanhorst
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The last sentence of this page says 'If the tensor size is not divisible by the chunks value, the last chunk will be smaller.' This is not always the case. By using the same example: t = torch.rand(6), if we run torch.chunk(t, 4), we will get the same result as torch.chunk(t, 3). One can also use t=torch.rand(7) and try to split it into 2, 3, and 4 chunks to see how the result looks like.
I suggest the sentence be rewritten as 'If the tensor size is not divisible by the chunks value, the resulting number of chunks may be less than intended and/or the last chunk may be smaller than the others'.
Beta Was this translation helpful? Give feedback.
All reactions