From c476792e366626bec3b5a44b642c315239311516 Mon Sep 17 00:00:00 2001 From: Francois Chollet Date: Fri, 5 Jan 2018 15:38:49 -0800 Subject: [PATCH] Docstring fixes. --- keras/engine/training.py | 10 +++++----- keras/preprocessing/image.py | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/keras/engine/training.py b/keras/engine/training.py index 94ce74fc7b6..28728424f27 100644 --- a/keras/engine/training.py +++ b/keras/engine/training.py @@ -1931,8 +1931,8 @@ def fit_generator(self, # Arguments generator: A generator or an instance of `Sequence` (`keras.utils.Sequence`) - object in order to avoid duplicate data - when using multiprocessing. + object in order to avoid duplicate data + when using multiprocessing. The output of the generator must be either - a tuple `(inputs, targets)` - a tuple `(inputs, targets, sample_weights)`. @@ -2336,9 +2336,9 @@ def predict_generator(self, generator, steps=None, # Arguments generator: Generator yielding batches of input samples - or an instance of Sequence (keras.utils.Sequence) - object in order to avoid duplicate data - when using multiprocessing. + or an instance of Sequence (keras.utils.Sequence) + object in order to avoid duplicate data + when using multiprocessing. steps: Total number of steps (batches of samples) to yield from `generator` before stopping. Optional for `Sequence`: if unspecified, will use diff --git a/keras/preprocessing/image.py b/keras/preprocessing/image.py index 11287307171..c403d896b29 100644 --- a/keras/preprocessing/image.py +++ b/keras/preprocessing/image.py @@ -946,6 +946,7 @@ def _count_valid_files_in_directory(directory, white_list_formats, follow_links) directory: absolute path to the directory containing files to be counted white_list_formats: set of strings containing allowed extensions for the files to be counted. + follow_links: boolean. # Returns the count of files with extension in `white_list_formats` contained in @@ -969,7 +970,7 @@ def _recursive_list(subpath): def _list_valid_filenames_in_directory(directory, white_list_formats, class_indices, follow_links): - """List paths of files in `subdir` relative from `directory` whose extensions are in `white_list_formats`. + """List paths of files in `subdir` with extensions in `white_list_formats`. # Arguments directory: absolute path to a directory containing the files to list. @@ -977,6 +978,7 @@ def _list_valid_filenames_in_directory(directory, white_list_formats, white_list_formats: set of strings containing allowed extensions for the files to be counted. class_indices: dictionary mapping a class name to its index. + follow_links: boolean. # Returns classes: a list of class indices