forked from mindspore-Ecosystem/mindspore
fix doc issue
This commit is contained in:
parent
f64181e79a
commit
b7616428d0
|
@ -1,7 +1,7 @@
|
|||
|
||||
.. py:class:: mindspore.mindrecord.Cifar100ToMR(source, destination)
|
||||
|
||||
将CIFAR-100数据集转换为MindRecord格式数据集的类。
|
||||
将CIFAR-100数据集转换为MindRecord格式数据集。
|
||||
|
||||
.. note::
|
||||
示例的详细信息,请参见 `转换CIFAR-10数据集 <https://mindspore.cn/docs/programming_guide/zh-CN/master/dataset_conversion.html#转换CIFAR-10数据集>`_。
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
.. py:class:: mindspore.mindrecord.Cifar10ToMR(source, destination)
|
||||
|
||||
将CIFAR-10数据集转换为MindRecord格式数据集的类。
|
||||
将CIFAR-10数据集转换为MindRecord格式数据集。
|
||||
|
||||
.. note::
|
||||
示例的详细信息,请参见 `转换CIFAR-10数据集 <https://mindspore.cn/docs/programming_guide/zh-CN/master/dataset_conversion.html#转换CIFAR-10数据集>`_。
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
.. py:class:: mindspore.mindrecord.CsvToMR(source, destination, columns_list=None, partition_number=1)
|
||||
|
||||
将CSV格式数据集转换为MindRecord格式数据集的类。
|
||||
将CSV格式数据集转换为MindRecord格式数据集。
|
||||
|
||||
.. note::
|
||||
示例的详细信息,请参见 `转换CSV数据集 <https://mindspore.cn/docs/programming_guide/zh-CN/master/dataset_conversion.html#转换CSV数据集>`_。
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
|
||||
.. py:class:: mindspore.mindrecord.FileReader(file_name, num_consumer=4, columns=None, operator=None)
|
||||
|
||||
读取MindRecord格式数据集的类。
|
||||
读取MindRecord格式数据集。
|
||||
|
||||
.. note::
|
||||
- 如果 `file_name` 是文件名的字符串,则会尝试加载同一批转换生成的所有MindRecord文件,如果缺少其中某个MindRecord文件,则会引发异常。
|
||||
- 如果 `file_name` 是文件名的列表,则只加载列表中指定的MindRecord文件。
|
||||
- 如果 `file_name` 是文件路径的字符串,则会尝试加载同一批转换生成的所有MindRecord文件,如果缺少其中某个MindRecord文件,则会引发异常。
|
||||
- 如果 `file_name` 是文件路径组成的列表,则只加载列表中指定的MindRecord文件。
|
||||
|
||||
**参数:**
|
||||
|
||||
- **file_name** (str, list[str]) - MindRecord格式的数据集文件或文件列表。
|
||||
- **file_name** (str, list[str]) - MindRecord格式的数据集文件路径或文件路径组成的列表。
|
||||
- **num_consumer** (int,可选) - 加载数据的并发数。默认值:4。不应小于1或大于处理器的核数。
|
||||
- **columns** (list[str],可选) - MindRecord中待读取数据列的列表。默认值:None,读取所有的数据列。
|
||||
- **operator** (int,可选) - 保留参数。默认值:None。
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
.. py:method:: get_next()
|
||||
|
||||
按列名一次返回一个batch的数据。
|
||||
按列名一次返回下一批的数据。
|
||||
|
||||
**返回:**
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
.. py:class:: mindspore.mindrecord.ImageNetToMR(map_file, image_dir, destination, partition_number=1)
|
||||
|
||||
将ImageNet数据集转换为MindRecord格式数据集的类。
|
||||
将ImageNet数据集转换为MindRecord格式数据集。
|
||||
|
||||
.. note::
|
||||
示例的详细信息,请参见 `Converting the ImageNet Dataset <https:// www.mindspore.cn/docs/programming_guide/en/master/dataset_conversion.html#converting-the-imagenet-dataset>`_。
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
.. py:class:: mindspore.mindrecord.MnistToMR(source, destination, partition_number=1)
|
||||
|
||||
将MNIST数据集转换为MindRecord格式数据集的类。
|
||||
将MNIST数据集转换为MindRecord格式数据集。
|
||||
|
||||
**参数:**
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
.. py:class:: mindspore.mindrecord.TFRecordToMR(source, destination, feature_dict, bytes_fields=None)
|
||||
|
||||
将TFRecord格式数据集转换为MindRecord格式数据集的类。
|
||||
将TFRecord格式数据集转换为MindRecord格式数据集。
|
||||
|
||||
.. note::
|
||||
示例的详细信息,请参见 `转换TFRecord数据集 <https://mindspore.cn/docs/programming_guide/zh-CN/master/dataset_conversion.html#转换TFRecord数据集>`_。
|
||||
|
@ -10,8 +10,8 @@
|
|||
|
||||
- **source** (str) - 待转换的TFRecord文件路径。
|
||||
- **destination** (str) - 转换生成的MindRecord文件路径,需提前创建目录并且目录下不能存在同名文件。
|
||||
- **feature_dict** (dict[str, `FixedLenFeature <https://www.tensorflow.org/api_docs/python/tf/io/FixedLenFeature>`_ ]) - TFRecord的feature类别的字典,
|
||||
不支持 `VarLenFeature <https://www.tensorflow.org/api_docs/python/tf/io/VarLenFeature>`_ 类别。
|
||||
- **feature_dict** (dict[str, FixedLenFeature]) - TFRecord的feature类别的字典,当前支持
|
||||
`FixedLenFeature <https://www.tensorflow.org/api_docs/python/tf/io/FixedLenFeature>`_ 类型。
|
||||
- **bytes_fields** (list[str],可选) - `feature_dict` 中的字节字段,可以为字节类型的图像字段。
|
||||
|
||||
**异常:**
|
||||
|
|
|
@ -31,12 +31,12 @@ class FileReader:
|
|||
Class to read MindRecord files.
|
||||
|
||||
Note:
|
||||
If `file_name` is a filename string, it tries to load all MindRecord files generated \
|
||||
If `file_name` is a file path, it tries to load all MindRecord files generated \
|
||||
in a conversion, and throws an exception if a MindRecord file is missing.
|
||||
If `file_name` is a filename list, only the MindRecord files in the list are loaded.
|
||||
If `file_name` is file path list, only the MindRecord files in the list are loaded.
|
||||
|
||||
Args:
|
||||
file_name (str, list[str]): One of MindRecord file or a file list.
|
||||
file_name (str, list[str]): One of MindRecord file path or file path list.
|
||||
num_consumer(int, optional): Number of reader workers which load data. Default: 4.
|
||||
It should not be smaller than 1 or larger than the number of processor cores.
|
||||
columns (list[str], optional): A list of fields where corresponding data would be read. Default: None.
|
||||
|
|
|
@ -75,9 +75,8 @@ class TFRecordToMR:
|
|||
source (str): TFRecord file to be transformed.
|
||||
destination (str): MindRecord file path to transform into, ensure that no file with the same name
|
||||
exists in the directory.
|
||||
feature_dict (dict[str, `FixedLenFeature <https://www.tensorflow.org/api_docs/python/tf/io/FixedLenFeature>`_]): Dictionary
|
||||
that states the feature type, and `VarLenFeature <https://www.tensorflow.org/api_docs/python/tf/io/VarLenFeature>`_
|
||||
is not supported.
|
||||
feature_dict (dict[str, FixedLenFeature]): Dictionary that states the feature type, and
|
||||
`FixedLenFeature <https://www.tensorflow.org/api_docs/python/tf/io/FixedLenFeature>`_ is supported.
|
||||
bytes_fields (list[str], optional): The bytes fields which are in `feature_dict` and can be images bytes.
|
||||
Default: None.
|
||||
|
||||
|
|
Loading…
Reference in New Issue