提交 fa55cfd9 编写于 作者: L liyong

modify tutorial for minddata

上级 d9ad52ad
...@@ -178,12 +178,14 @@ You can use the `ImageNetToMR` class to convert the raw ImageNet data (images an ...@@ -178,12 +178,14 @@ You can use the `ImageNetToMR` class to convert the raw ImageNet data (images an
Store the downloaded ImageNet dataset in a folder. The folder contains all images and a mapping file that records labels of the images. Store the downloaded ImageNet dataset in a folder. The folder contains all images and a mapping file that records labels of the images.
In the mapping file, there are three columns, which are separated by spaces. They indicate image classes, label IDs, and label names. The following is an example of the mapping file: In the mapping file, there are two columns, which are separated by spaces. They indicate image classes and label IDs. The following is an example of the mapping file:
``` ```
n02119789 1 pen n01440760 0
n02100735 2 notbook n01443537 1
n02110185 3 mouse n01484850 2
n02096294 4 orange n01491361 3
n01494475 4
n01496331 5
``` ```
2. Import the `ImageNetToMR` class for dataset converting. 2. Import the `ImageNetToMR` class for dataset converting.
......
...@@ -65,7 +65,7 @@ To read a dataset using the `MindDataset` object, perform the following steps: ...@@ -65,7 +65,7 @@ To read a dataset using the `MindDataset` object, perform the following steps:
data_set = ds.MindDataset(dataset_file=CV_FILE_NAME) data_set = ds.MindDataset(dataset_file=CV_FILE_NAME)
``` ```
In the preceding information: In the preceding information:
`dataset_file`: specifies the MindRecord file, including the path and file name. `dataset_file`: specifies the MindRecord file or list of MindRecord files.
2. Create a dictionary iterator and read data records through the iterator. 2. Create a dictionary iterator and read data records through the iterator.
```python ```python
......
...@@ -178,12 +178,14 @@ MindSpore提供转换常见数据集的工具类,将常见数据集转换为Mi ...@@ -178,12 +178,14 @@ MindSpore提供转换常见数据集的工具类,将常见数据集转换为Mi
对下载后的ImageNet数据集,整理数据集组织形式为一个包含所有图片的文件夹,以及一个记录图片对应标签的映射文件。 对下载后的ImageNet数据集,整理数据集组织形式为一个包含所有图片的文件夹,以及一个记录图片对应标签的映射文件。
标签映射文件包含3列,分别为各类别图片目录、标签ID、标签名,用空格隔开,映射文件示例如下: 标签映射文件包含2列,分别为各类别图片目录、标签ID,用空格隔开,映射文件示例如下:
``` ```
n02119789 1 pen n01440760 0
n02100735 2 notbook n01443537 1
n02110185 3 mouse n01484850 2
n02096294 4 orange n01491361 3
n01494475 4
n01496331 5
``` ```
2. 导入转换数据集的工具类`ImageNetToMR` 2. 导入转换数据集的工具类`ImageNetToMR`
......
...@@ -65,7 +65,7 @@ MindSpore天然支持读取MindSpore数据格式——`MindRecord`存储的数 ...@@ -65,7 +65,7 @@ MindSpore天然支持读取MindSpore数据格式——`MindRecord`存储的数
data_set = ds.MindDataset(dataset_file=CV_FILE_NAME) data_set = ds.MindDataset(dataset_file=CV_FILE_NAME)
``` ```
其中, 其中,
`dataset_file`:指定MindRecord的文件,含路径及文件名 `dataset_file`:指定MindRecord的文件或文件列表
2. 创建字典迭代器,通过迭代器读取数据记录。 2. 创建字典迭代器,通过迭代器读取数据记录。
```python ```python
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册