shgh:

RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x1 and 3x256


So, this mis-match would indicate that state_size is different from what you expected. I assume that state_batch is a Tensor of shape 64x1? But expect it to be 64x3?



 shgh:

for experience in batch:
            state, action, reward, next_state, done = experience
            state_batch.append(state)
            action_batch.append(action)
            reward_batch.append(reward)
            next_state_batch.append(next_state)
            done_batch.append(done)

        return state_batch, action_batch, reward_batch, next_state_batch, done_batch



Also, if you’re expecting a Tensor to be passed in, shouldn’t you use torch.stack to covert the list of Tensors to a single Tensor which can be passed in batch? Could you check the type and shape of state_batch?