Building Tangent‐Linear and Adjoint Models for Data Assimilation With Neural Networks