TensorFlow and MindSpore

View Source On Gitee

Mapping between TensorFlow APIs and MindSpore APIs, which is provided by the community. There may be differences in parameters, inputs, outputs, logic functions, and specific scenarios. For details, see the description of each API or the difference comparison provided.

More MindSpore developers are also welcome to participate in improving the mapping content.

tf

tf.data

Many data processing operations in MindSpore are shared by each dataset class. The following uses ImageFolderDataset and CSVDataset as examples to compare the API differences, and other dataset classes are the same.

tf.distribute

tf.image

tf.io

TensorFlow 1.15 APIs

MindSpore APIs

Description

tf.io.decode_image

mindspore.dataset.vision.Decode

diff

tf.keras

tf.layers

TensorFlow 1.15 APIs

MindSpore APIs

Description

tf.layers.Dense

mindspore.nn.Dense

tf.linalg

TensorFlow 1.15 APIs

MindSpore APIs

Description

tf.linalg.matmul

mindspore.nn.MatMul

tf.math

tf.metrics

TensorFlow 1.15 APIs

MindSpore APIs

Description

tf.metrics.mean_iou

mindspore.ops.IOU

tf.nn

tf.random

TensorFlow 1.15 APIs

MindSpore APIs

Description

tf.random.gamma

mindspore.ops.Gamma

tf.random.uniform

mindspore.ops.uniform

tf.sparse

TensorFlow 1.15 APIs

MindSpore APIs

Description

tf.sparse.SparseTensor

mindspore.SparseTensor

tf.train

tfp

TensorFlow Probability 0.14.1 APIs

MindSpore APIs

Description

tfp.bijectors.Softplus

mindspore.nn.probability.bijector.Softplus

diff