API

MindSpore provides rich interfaces for model building, training, and inference. The functions of each module interface are described below.

Module Name

Descriptions

mindspore

Framework foundation interface.

mindspore.nn

A neural network layer for building predefined building blocks or computational units in a neural network.

mindspore.ops

Function interface.

mindspore.ops.primitive

Primitive operator.

mindspore.mint

Functional, nn, and optimizer interfaces consistent with mainstream industry usage.

mindspore.amp

Mixed-precision interface.

mindspore.train

Traning interface.

mindspore.communication

Collection communication interface.

mindspore.communication.comm_func

Collection communication functional interface.

mindspore.common.initializer

Parameter initialization.

mindspore.hal

Interface of device management, stream management, event management and memory management.

mindspore.dataset

Interfaces for loading and processing various datasets.

mindspore.dataset.transforms

Generalized data transformations.

mindspore.mindrecord

Operations interface related to efficient data format MindRecord developed by MindSpore.

mindspore.nn.probability

Parameterizable probability distributions and sampling functions.

mindspore.rewrite

Custom rule-based model source code modification interface.

mindspore.multiprocessing

Multi-processing interface.

mindspore.boost

Automatic acceleration network interfaces.

mindspore.numpy

NumPy Class interface.

mindspore.scipy

SciPy Class interface.

mindspore.utils

Tools interface.

mindspore.experimental

Experimental interface.

Environment Variables

Notes related to environment variables.