Artificial neural network (ANN) models are used to learn the nonlinear constitutive laws based on indirectly measurable data. The real input and output of the ANN model are derived from indirect data using a mechanical system, which is composed of several subsystems including the ANN model. As the ANN model is coupled with other subsystems, the input of the ANN model needs to be determined during the training. This approach integrates measurable data, mechanics, and ANN models so that the ANN models can be trained without direct data which is usually not available from experiments. Two examples are provided as an illustration of the proposed approach. The first example uses two-dimensional (2D) finite element (FE) analysis to train an ANN model to learn the nonlinear in-plane shear constitutive law. The second example applies a continuum damage model to train an ANN model to learn the damage accumulation law. The results show that the trained ANN models achieve great accuracy based on the proposed approach.