  We introduce a training rule that enables a network composed of springs and
dashpots to learn precise stress patterns. Our goal is to control the tensions
on a fraction of "target" bonds, which are chosen randomly. The system is
trained by applying stresses to the target bonds, causing the remaining bonds,
which act as the learning degrees of freedom, to evolve. Different criteria for
selecting the target bonds affects whether frustration is present. When there
is at most a single target bond per node the error converges to computer
precision. Additional targets on a single node may lead to slow convergence and
failure. Nonetheless, training is successful even when approaching the limit
predicted by the Maxwell Calladine theorem. We demonstrate the generality of
these ideas by considering dashpots with yield stresses. We show that training
converges, albeit with a slower, power-law decay of the error. Furthermore,
dashpots with yielding stresses prevent the system from relaxing after
training, enabling to encode permanent memories.
