Based on my understanding, CNN output size for 1D is
output_size = (input_size - kernel_size + 2*padding)//stride + 1
Refer to PyTorch DQN Tutorial. In the tutorial, it uses 0 padding, which is fine. However, it computes the output size as follows:
def conv2d_size_out(size, kernel_size = 5, stride = 2):
return (size - (kernel_size - 1) - 1) // stride + 1
It the above a mistake or is there something I missed?