MCPcopy Index your code
hub / github.com/PaddlePaddle/PaddleRec / save_static_model

Function save_static_model

tools/utils/save_load.py:54–62  ·  view source on GitHub ↗

save model to the target path

(program, model_path, epoch_id, prefix='rec_static')

Source from the content-addressed store, hash-verified

52
53
54def 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
65def save_inference_model(model_path,

Callers 1

mainFunction · 0.90

Calls 1

_mkdir_if_not_existFunction · 0.70

Tested by

no test coverage detected