mindspore.ops.core
- mindspore.ops.core(fn=None,**flags, **flags)[source]
A decorator that adds a flag to the function.
By default, the function is marked as True, enabling to use this decorator to set flag to a graph.
- Parameters
fn (Function) – Function to add flag. Default: None.
flags (dict) – The following flags can be set core, which indicates that this is a core function or other flag. Default: None.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> net = Net() >>> net = core(net, predit=True) >>> print(hasattr(net, '_mindspore_flags')) True