335 Star 1.5K Fork 862

MindSpore / docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
fashion_mnist.md 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
luojianing 提交于 2023-07-21 15:16 . replace target=blank

Function Differences with tf.keras.datasets.fashion_mnist

View Source On Gitee

tf.keras.datasets.fashion_mnist

class tf.keras.datasets.fashion_mnist()

For more information, see tf.keras.datasets.fashion_mnist.

mindspore.dataset.FashionMnistDataset

class mindspore.dataset.FashionMnistDataset(
    dataset_dir,
    usage=None,
    num_samples=None,
    num_parallel_workers=None,
    shuffle=None,
    sampler=None,
    num_shards=None,
    shard_id=None,
    cache=None
)

For more information, see mindspore.dataset.FashionMnistDataset.

Differences

TensorFlow: The Fashion MNIST dataset can be downloaded and loaded using the load_data method within this class.

MindSpore: Load the Fashion MNIST dataset file from the specified path and return the Dataset.

Code Example

# The following implements FashionMnistDataset with MindSpore.
import mindspore.dataset as ds

fashion_mnist_dataset_dir = "/path/to/fashion_mnist_dataset_directory"
dataset = ds.FashionMnistDataset(dataset_dir=fashion_mnist_dataset_dir)

# The following implements fashion_mnist with TensorFlow.
import tensorflow as tf

(x_train, y_train), (x_test, y_test) = tf.keras.datasets.fashion_mnist.load_data()
1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs
r2.0

搜索帮助

53164aa7 5694891 3bd8fe86 5694891