  Imaging Earth structure or seismic sources from seismic data involves
minimizing a target misfit function, and is commonly solved through
gradient-based optimization. The adjoint-state method has been developed to
compute the gradient efficiently; however, its implementation can be
time-consuming and difficult. We develop a general seismic inversion framework
to calculate gradients using reverse-mode automatic differentiation. The
central idea is that adjoint-state methods and reverse-mode automatic
differentiation are mathematically equivalent. The mapping between numerical
PDE simulation and deep learning allows us to build a seismic inverse modeling
library, ADSeismic, based on deep learning frameworks, which supports high
performance reverse-mode automatic differentiation on CPUs and GPUs. We
demonstrate the performance of ADSeismic on inverse problems related to
velocity model estimation, rupture imaging, earthquake location, and source
time function retrieval. ADSeismic has the potential to solve a wide variety of
inverse modeling applications within a unified framework.
