diff --git a/mindspore/mindrecord/filereader.py b/mindspore/mindrecord/filereader.py index 91901ead459..c6ebe2837ba 100644 --- a/mindspore/mindrecord/filereader.py +++ b/mindspore/mindrecord/filereader.py @@ -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() diff --git a/mindspore/mindrecord/filewriter.py b/mindspore/mindrecord/filewriter.py index 5bf63780e74..e0cdf500e74 100644 --- a/mindspore/mindrecord/filewriter.py +++ b/mindspore/mindrecord/filewriter.py @@ -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. diff --git a/mindspore/mindrecord/tools/cifar100_to_mr.py b/mindspore/mindrecord/tools/cifar100_to_mr.py index e7f8d65b813..ffeffad4e80 100644 --- a/mindspore/mindrecord/tools/cifar100_to_mr.py +++ b/mindspore/mindrecord/tools/cifar100_to_mr.py @@ -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. diff --git a/mindspore/mindrecord/tools/tfrecord_to_mr.py b/mindspore/mindrecord/tools/tfrecord_to_mr.py index a1511b4a695..92c85fee123 100644 --- a/mindspore/mindrecord/tools/tfrecord_to_mr.py +++ b/mindspore/mindrecord/tools/tfrecord_to_mr.py @@ -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.