!13439 add model attr train/predict network

From: @changzherui
Reviewed-by: @kingxian,@zhoufeng54
Signed-off-by: @kingxian
This commit is contained in:
mindspore-ci-bot 2021-03-17 17:46:40 +08:00 committed by Gitee
commit ee7fcccec6
1 changed files with 15 additions and 0 deletions

View File

@ -842,5 +842,20 @@ class Model:
if param.cache_enable:
Tensor(param).flush_from_cache()
@property
def train_network(self):
"""Get the model's train_network."""
return self._train_network
@property
def predict_network(self):
"""Get the model's predict_network."""
return self._predict_network
@property
def eval_network(self):
"""Get the model's eval_network."""
return self._eval_network
__all__ = ["Model"]