  The high computational cost of wide-parameter-space searches for continuous
gravitational waves (CWs) significantly limits the achievable sensitivity. This
challenge has motivated the exploration of alternative search methods, such as
deep neural networks (DNNs). Previous attempts to apply convolutional
image-classification DNN architectures to all-sky and directed CW searches
showed promise for short, one-day search durations, but proved ineffective for
longer durations of around ten days. In this paper, we offer a hypothesis for
this limitation and propose new design principles to overcome it. As a proof of
concept, we show that our novel convolutional DNN architecture attains
matched-filtering sensitivity for a targeted search (i.e., single sky-position
and frequency) in Gaussian data from two detectors spanning ten days. We
illustrate this performance for two different sky positions and five
frequencies in the $20 - 1000 \mathrm{Hz}$ range, spanning the spectrum from an
``easy'' to the ``hardest'' case. The corresponding sensitivity depths fall in
the range of $82 - 86 / \sqrt{\mathrm{Hz}}$. The same DNN architecture is
trained for each case, taking between $4 - 32$ hours to reach matched-filtering
sensitivity. The detection probability of the trained DNNs as a function of
signal amplitude varies consistently with that of matched filtering.
Furthermore, the DNN statistic distributions can be approximately mapped to
those of the $\mathcal{F}$-statistic under a simple monotonic function.
