Joint inference and input optimization in equilibrium networks — arXiv2