  Upcoming measurements of the high-redshift 21 cm signal from the Epoch of
Reionization (EoR) are a promising probe of the astrophysics of the first
galaxies and of cosmological parameters. In particular, the optical depth
$\tau$ to the last scattering surface of the cosmic microwave background (CMB)
should be tightly constrained by direct measurements of the neutral hydrogen
state at high redshift. A robust measurement of $\tau$ from 21 cm data would
help eliminate it as a nuisance parameter from CMB estimates of cosmological
parameters. Previous proposals for extracting $\tau$ from future 21 cm datasets
have typically used the 21 cm power spectra generated by semi-numerical models
to reconstruct the reionization history. We present here a different approach
which uses convolution neural networks (CNNs) trained on mock images of the 21
cm EoR signal to extract $\tau$. We construct a CNN that improves upon on
previously proposed architectures, and perform an automated hyperparameter
optimization. We show that well-trained CNNs are able to accurately predict
$\tau$, even when removing Fourier modes that are expected to be corrupted by
bright foreground contamination of the 21 cm signal. Typical random errors for
an optimized network are less than $3.06\%$, with biases factors of several
smaller. While preliminary, this approach could yield constraints on $\tau$
that improve upon sample-variance limited measurements of the low-$\ell$ EE
observations of the CMB, making this approach a valuable complement to more
traditional methods of inferring $\tau$.
