Constrained deep networks: Lagrangian optimization via Log-barrier extensions