save model to the target path
(program, model_path, epoch_id, prefix='rec_static')
| 52 | |
| 53 | |
| 54 | def save_static_model(program, model_path, epoch_id, prefix='rec_static'): |
| 55 | """ |
| 56 | save model to the target path |
| 57 | """ |
| 58 | model_path = os.path.join(model_path, str(epoch_id)) |
| 59 | _mkdir_if_not_exist(model_path) |
| 60 | model_prefix = os.path.join(model_path, prefix) |
| 61 | paddle.static.save(program, model_prefix) |
| 62 | logger.info("Already save model in {}".format(model_path)) |
| 63 | |
| 64 | |
| 65 | def save_inference_model(model_path, |
no test coverage detected