Fix a bug in save_inference_model and prune when the program is initailized by load_inference_model (#10011) * Fix bug in save_inference_model and prune when the program is initialized by load_inference_program. * Save the transpiled program instead.