sciai.context.init_project
- sciai.context.init_project(mode=None, device_id=None, seed=1234, args=None)[source]
Initialize one project with context setting, random seed setting, directory creation and log level setting.
- Parameters
mode (Union(int, None)) – ms.PYNATIVE_MODE for dynamic graph, ms.GRAPHE_MODE for static graph. If None, ms.GRAPHE_MODE would be set. Default: None.
device_id (Union(int, None)) – Set device_id if given, which suppresses args.device_id. Default: None.
seed (int) – Random seed. Default: 1234.
args (Union(None, Namespace)) – Arguments namespace. Default: None.
- Supported Platforms:
GPU
CPU
Ascend
- Raises
ValueError – If input parameters are not legal.