How to change input type(image) to list or array when using PyTorch tutorial code
I have searched the code that uses list or array input data for training DQN code. But I have could not find any code. 

Currently, I reference the reinforcement learning tutorial(DQN) of Pytorch.
However, this code uses image input data.

I want to know how to change the image input data to list or array input data. 

(I need help to resolve my research that uses list input data. List input data shape is 1 by 9. )

In PyTorch, we deal with tensors. Images, text, even sounds can be transformed to tensors and then PyTorch models can learn on the data.

In PyTorch image classifier examples, you often see something like this, to transform images to tensors:

train_transform = transforms.Compose([
                                      transforms.Resize(x),
                                      ...
                                      transforms.ToTensor()
                                     ])


If your input is a numpy array x, you can convert it to a tensor like this:

torch.from_numpy(x)


You also have to pay attention to tensor dimensions, your input data needs to match what the model expects in the first layer.
