  We examine the applicability of modern neural network architectures to the
midterm prediction of earthquakes. Our data-based classification model aims to
predict if an earthquake with the magnitude above a threshold takes place at a
given area of size $10 \times 10$ kilometers in $10$-$60$ days from a given
moment. Our deep neural network model has a recurrent part (LSTM) that accounts
for time dependencies between earthquakes and a convolutional part that
accounts for spatial dependencies. Obtained results show that neural
networks-based models beat baseline feature-based models that also account for
spatio-temporal dependencies between different earthquakes. For historical data
on Japan earthquakes our model predicts occurrence of an earthquake in $10$ to
$60$ days from a given moment with magnitude $M_c > 5$ with quality metrics ROC
AUC $0.975$ and PR AUC $0.0890$, making $1.18 \cdot 10^3$ correct predictions,
while missing $2.09 \cdot 10^3$ earthquakes and making $192 \cdot 10^3$ false
alarms. The baseline approach has similar ROC AUC $0.992$, number of correct
predictions $1.19 \cdot 10^3$, and missing $2.07 \cdot 10^3$ earthquakes, but
significantly worse PR AUC $0.00911$, and number of false alarms $1004 \cdot
10^3$.
