fix pre_rec loss layer