Direct and inverse modeling of soft robots by learning a condensed FEM model