You have a lot of examples from DQN implementations (for ex https://github.com/ikostrikov/pytorch-a3c/blob/master/model.py 182)
In your case, you just use 1-layer LSTM, so I would suggest nn.LSTMCell instead of nn.LSTM.:
# in your constructor:
self.lstm = nn.LSTMCell(17664, 1024)
self.fc = nn.Linear(1024, 1)

# in your forward:
def forward(self, inputs):
    x, (hx, cx) = inputs
    # *CNN forward over x*
    x = x.view(-1, self.num_flat_features(x))
    hx, cx = self.lstm(x, (hx, cx))
    x = hx
    x = self.fc(x)
    return x, (hx, cx)