Browse Source

fix mindrecord api doc

tags/v1.6.0
liyong 4 years ago
parent
commit
b612aab300
4 changed files with 7 additions and 6 deletions
  1. +2
    -2
      mindspore/mindrecord/filereader.py
  2. +2
    -2
      mindspore/mindrecord/filewriter.py
  3. +2
    -2
      mindspore/mindrecord/tools/cifar100_to_mr.py
  4. +1
    -0
      mindspore/mindrecord/tools/tfrecord_to_mr.py

+ 2
- 2
mindspore/mindrecord/filereader.py View File

@@ -30,7 +30,7 @@ class FileReader:

Note:
If `file_name` is a filename string, it tries to load all MindRecord files generated \
in a conversion, and throws an exceptions if a MindRecord file is missing.
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.

Args:
@@ -75,5 +75,5 @@ class FileReader:
iterator = self._reader.get_next()

def close(self):
"""Stop reader worker and close File."""
"""Stop reader worker and close file."""
self._reader.close()

+ 2
- 2
mindspore/mindrecord/filewriter.py View File

@@ -322,7 +322,7 @@ class FileWriter:

Args:
header_size (int): Size of header, between 16*1024(16KB) and
128*1024*1024(128MB).(default=16MB)
128*1024*1024(128MB).


Returns:
@@ -349,7 +349,7 @@ class FileWriter:

Args:
page_size (int): Size of page, between 32*1024(32KB) and
256*1024*1024(256MB).(default=32MB)
256*1024*1024(256MB).

Returns:
MSRStatus, SUCCESS or FAILED.


+ 2
- 2
mindspore/mindrecord/tools/cifar100_to_mr.py View File

@@ -77,7 +77,7 @@ class Cifar100ToMR:
Execute transformation from cifar100 to MindRecord.

Args:
fields (list[str]): A list of index field, e.g.["fine_label", "coarse_label"].
fields (list[str]): A list of index field, e.g.["fine_label", "coarse_label"]. Default: None.

Returns:
MSRStatus, whether cifar100 is successfully transformed to MindRecord.
@@ -116,7 +116,7 @@ class Cifar100ToMR:
Encapsulate the run function to exit normally

Args:
fields (list[str]): A list of index field, e.g.["fine_label", "coarse_label"].
fields (list[str]): A list of index field, e.g.["fine_label", "coarse_label"]. Default: None.

Returns:
MSRStatus, whether cifar100 is successfully transformed to MindRecord.


+ 1
- 0
mindspore/mindrecord/tools/tfrecord_to_mr.py View File

@@ -77,6 +77,7 @@ class TFRecordToMR:
feature_dict (dict): a dictionary that states the feature type, and
`VarLenFeature` is not supported.
bytes_fields (list, optional): the bytes fields which are in `feature_dict` and can be images bytes.
Default: None.

Raises:
ValueError: If parameter is invalid.


Loading…
Cancel
Save