Categories
Misc

Creating a tensor using linspace function

Hello Guys,

I’m challenging myself to create simple 1 dimension tensor that consist of integers, range from 1-10 using the linespace function and with a shape of 6. However I haven’t been successful doing that. How do I fix this ?

My code:

[1,2,3,4,5,6,7,8,9,10]

torch.linspace(1, 1, 10)

submitted by /u/destin95
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *