Well, I’m pretty sure poisson lpdf is the thing to use here. If “overfit” mode doesn’t work, some reasons are:
1)lr is too low, try tuning it or using Adadelta
2)LSTM gates are saturated - 18k inputs is kinda extreme, so you’d need normalization, “compressing” layers and/or other strategies to create good rnn inputs
3)with hidden_size:output_size ratio 1:1 LSTM “memory” is heavily contested by column predictions - some columns may be underfit as a result; to isolate this issue, try optimizing single columns (this issue wouldn’t prevent loss from decreasing though)