Skip to content

Commit

Permalink
Docstring fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jan 5, 2018
1 parent 2b34969 commit c476792
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions keras/engine/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)`.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion keras/preprocessing/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -969,14 +970,15 @@ 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.
The directory name is used as class label and must be a key of `class_indices`.
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
Expand Down

0 comments on commit c476792

Please sign in to comment.