!27721 [MD] fix mindrecord api doc

Merge pull request !27721 from liyong126/code_docs_fix_api_doc_1
This commit is contained in:
i-robot 2021-12-15 09:36:11 +00:00 committed by Gitee
commit 7faf3f6c82
4 changed files with 7 additions and 6 deletions

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()

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.

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.

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.