Initializes the dataset. Args: data_sources: A list of files that make up the dataset. reader: The reader class, a subclass of BaseReader such as TextLineReader or TFRecordReader. decoder: An instance of a data_decoder. num_samples: The number of samples in the d
(self, data_sources, reader, decoder, num_samples,
items_to_descriptions, **kwargs)
| 39 | """Represents a Dataset specification.""" |
| 40 | |
| 41 | def __init__(self, data_sources, reader, decoder, num_samples, |
| 42 | items_to_descriptions, **kwargs): |
| 43 | """Initializes the dataset. |
| 44 | |
| 45 | Args: |
| 46 | data_sources: A list of files that make up the dataset. |
| 47 | reader: The reader class, a subclass of BaseReader such as TextLineReader |
| 48 | or TFRecordReader. |
| 49 | decoder: An instance of a data_decoder. |
| 50 | num_samples: The number of samples in the dataset. |
| 51 | items_to_descriptions: A map from the items that the dataset provides to |
| 52 | the descriptions of those items. |
| 53 | **kwargs: Any remaining dataset-specific fields. |
| 54 | """ |
| 55 | kwargs['data_sources'] = data_sources |
| 56 | kwargs['reader'] = reader |
| 57 | kwargs['decoder'] = decoder |
| 58 | kwargs['num_samples'] = num_samples |
| 59 | kwargs['items_to_descriptions'] = items_to_descriptions |
| 60 | self.__dict__.update(kwargs) |