fix mindrecord api doc

This commit is contained in:
liyong 2021-12-15 16:24:30 +08:00
parent 00da76efd9
commit b612aab300
4 changed files with 7 additions and 6 deletions

View File

@ -30,7 +30,7 @@ class FileReader:
Note: Note:
If `file_name` is a filename string, it tries to load all MindRecord files generated \ 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. If `file_name` is a filename list, only the MindRecord files in the list are loaded.
Args: Args:
@ -75,5 +75,5 @@ class FileReader:
iterator = self._reader.get_next() iterator = self._reader.get_next()
def close(self): def close(self):
"""Stop reader worker and close File.""" """Stop reader worker and close file."""
self._reader.close() self._reader.close()

View File

@ -322,7 +322,7 @@ class FileWriter:
Args: Args:
header_size (int): Size of header, between 16*1024(16KB) and header_size (int): Size of header, between 16*1024(16KB) and
128*1024*1024(128MB).(default=16MB) 128*1024*1024(128MB).
Returns: Returns:
@ -349,7 +349,7 @@ class FileWriter:
Args: Args:
page_size (int): Size of page, between 32*1024(32KB) and page_size (int): Size of page, between 32*1024(32KB) and
256*1024*1024(256MB).(default=32MB) 256*1024*1024(256MB).
Returns: Returns:
MSRStatus, SUCCESS or FAILED. MSRStatus, SUCCESS or FAILED.

View File

@ -77,7 +77,7 @@ class Cifar100ToMR:
Execute transformation from cifar100 to MindRecord. Execute transformation from cifar100 to MindRecord.
Args: 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: Returns:
MSRStatus, whether cifar100 is successfully transformed to MindRecord. MSRStatus, whether cifar100 is successfully transformed to MindRecord.
@ -116,7 +116,7 @@ class Cifar100ToMR:
Encapsulate the run function to exit normally Encapsulate the run function to exit normally
Args: 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: Returns:
MSRStatus, whether cifar100 is successfully transformed to MindRecord. 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 feature_dict (dict): a dictionary that states the feature type, and
`VarLenFeature` is not supported. `VarLenFeature` is not supported.
bytes_fields (list, optional): the bytes fields which are in `feature_dict` and can be images bytes. bytes_fields (list, optional): the bytes fields which are in `feature_dict` and can be images bytes.
Default: None.
Raises: Raises:
ValueError: If parameter is invalid. ValueError: If parameter is invalid.