Deep-learning techniques appear to be poised to play very important roles in our processing flows for inversion and interpretation of seismic data. The most successful seismic applications of these complex pattern-identifying networks will, presumably, be those that also leverage the deterministic physical models on which we normally base our seismic interpretations. If this is true, algorithms belonging to theory-guided data science, whose aim is roughly this, will have particular applicability in our field. We have developed a theory-designed recurrent neural network (RNN) that allows single- and multidimensional scalar acoustic seismic forward-modeling problems to be set up in terms of its forward propagation. We find that training such a network and updating its weights using measured seismic data then amounts to a solution of the seismic inverse problem and is equivalent to gradient-based seismic full-waveform inversion (FWI). By refining these RNNs in terms of optimization method and learning rate, comparisons are made between standard deep-learning optimization and nonlinear conjugate gradient and limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) optimized algorithms. Our numerical analysis indicates that adaptive moment (or Adam) optimization with a learning rate set to match the magnitudes of standard FWI updates appears to produce the most stable and well-behaved waveform inversion results, which is reconfirmed by a multidimensional 2D Marmousi experiment. Future waveform RNNs, with additional degrees of freedom, may allow optimal wave propagation rules to be solved for at the same time as medium properties, reducing modeling errors.