#not sure how to fix this pytorch issue

9 messages · Page 1 of 1 (latest)

velvet flower
#

The indices must be integers, so whole numbers. You're using 0.8 * len(X) which will be a float, not an integer.

pallid helm
#

So do I just use the % instead of the decimal?

velvet flower
#

I don't actually know. You could try that. You could also try converting the indices to ints

#

int(some_float) that will convert it to an int

pallid helm
#

All right I’ll try that when I’m home

hidden jasper
#

Zech is correct

#

You're going to want to do int(0.8 * len(x))

#

Additionally, you'd probably want to shuffle your data before doing the splitting