add model attr

This commit is contained in:
changzherui 2021-03-16 23:01:03 +08:00
parent 0fdf5c54e3
commit 441aca02f7
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"]