I believe the issue is with where you’ve placed the closing parenthesis for the tensor
call. I’m assuming you are working through 04_mnist_basics.ipynb. You want to close the parenthesis to tensor
after Image.open(o)
like the following:
seven_tensors = [tensor(Image.open(o)) for o in sevens]
three_tensors = [tensor(Image.open(o)) for o in threes]
len(three_tensors),len(seven_tensors)
3 Likes
thank you.