fix dataset api description

This commit is contained in:
Yanjun Peng 2020-04-17 15:40:16 +08:00
parent 2d31ae97e8
commit c69f3be758
3 changed files with 8 additions and 5 deletions

View File

@ -556,7 +556,7 @@ class Dataset:
Note:
If device is Ascend, features of data will be transferred one by one. The limitation
of data transferation per time is 256M.
of data transmission per time is 256M.
Return:
TransferDataset, dataset for transferring.
@ -572,7 +572,7 @@ class Dataset:
Note:
If device is Ascend, features of data will be transferred one by one. The limitation
of data transferation per time is 256M.
of data transmission per time is 256M.
Returns:
TransferDataset, dataset for transferring.
@ -1897,7 +1897,7 @@ class GeneratorDataset(SourceDataset):
>>> for i in range(maxid):
>>> yield (np.array([i]), np.array([[i, i + 1], [i + 2, i + 3]]))
>>> # create multi_column_generator_dataset with GeneratorMC and column names "col1" and "col2"
>>> multi_column_generator_dataset = de.GeneratorDataset(generator_mc, ["col1, col2"])
>>> multi_column_generator_dataset = de.GeneratorDataset(generator_mc, ["col1", "col2"])
>>> # 3) Iterable dataset as iterable input
>>> class MyIterable():
>>> def __iter__(self):

View File

@ -112,8 +112,7 @@ class RandomSampler():
Args:
replacement (bool, optional): If True, put the sample ID back for the next draw (default=False).
num_samples (int, optional): Number of elements to sample (default=None, all elements). This
argument should be specified only when 'replacement' is "True".
num_samples (int, optional): Number of elements to sample (default=None, all elements).
Examples:
>>> import mindspore.dataset as ds

View File

@ -362,6 +362,8 @@ class Model:
If dataset_sink_mode is True, epoch of training should be equal to the count of repeat
operation in dataset processing. Otherwise, errors could occur since the amount of data
is not the amount training requires.
If dataset_sink_mode is True, data will be sent to device. If device is Ascend, features
of data will be transferred one by one. The limitation of data transmission per time is 256M.
Args:
epoch (int): Total number of iterations on the data.
@ -485,6 +487,8 @@ class Model:
Note:
CPU is not supported when dataset_sink_mode is true.
If dataset_sink_mode is True, data will be sent to device. If device is Ascend, features
of data will be transferred one by one. The limitation of data transmission per time is 256M.
Args:
valid_dataset (Dataset): Dataset to evaluate the model.