mindspore.build_searched_strategy
- mindspore.build_searched_strategy(strategy_filename)[source]
Build strategy of every parameter in network. Used in the case of distributed inference. For details of it, please check: https://www.mindspore.cn/docs/programming_guide/en/r1.6/save_load_model_hybrid_parallel.html.
- Parameters
strategy_filename (str) – Name of strategy file.
- Returns
Dict, whose key is parameter name and value is slice strategy of this parameter.
- Raises
ValueError – Strategy file is incorrect.
TypeError – strategy_filename is not a string.
Examples
>>> strategy = build_searched_strategy("./strategy_train.ckpt")