Question: tl.ShiftRight()

My understanding is that tl.ShiftRight moves all entries in the tensor to the right (by default one unit). Suppose we feed in tensors of length 10, possibly with padding. So tl.ShiftRight would do something like:

[ 2 3 4 5 6 1 0 0 0 0] → [0 2 3 4 6 1 0 0 0] (correct?)

But, what if there is no padding? Does it throw off the right-most char, which would be a 1, and add a 0 at the front?

[2 3 4 5 6 7 8 9 10 1] → [0 2 3 4 5 6 7 8 9 10] ??

Or does it increase all tensor lengths by 1 and add a 0 to the front?

Thanks for any help.

Great question @John8. It is the former.
For a tensor [1 2 3 4 5] using shiftright it will give [0 1 2 3 4]. Hope that answers your query.

Hi, im stuck on this part of the assignment now - am getting the following error despite just passing the units an integer equal to 1?

ShiftRight() got an unexpected keyword argument 'n_shifts'