The Deep Ritz Method can be used to model strain localization in elastoplastic solids as sharp discontinuities in the displacement field.