Skip to content

Commit

Permalink
Improve docs for consistency as Markdown format (keras-team#12533)
Browse files Browse the repository at this point in the history
  • Loading branch information
taehoonlee authored and fchollet committed Mar 24, 2019
1 parent 9bd6978 commit adaed1f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion examples/lstm_stateful.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def gen_uniform_amp(amp=1, xn=10000):
-amp and +amp
and of length xn
Arguments:
# Arguments
amp: maximum/minimum range of uniform data
xn: length of series
"""
Expand Down
2 changes: 1 addition & 1 deletion keras/activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def hard_sigmoid(x):
def exponential(x):
"""Exponential (base e) activation function.
# Arguments:
# Arguments
x: Input tensor.
# Returns
Expand Down
6 changes: 3 additions & 3 deletions keras/engine/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ def from_config(cls, config, custom_objects=None):
def add_unprocessed_node(layer, node_data):
"""Add node to layer list
Args:
# Arguments
layer: layer object
node_data: Node data specifying layer call
"""
Expand All @@ -972,11 +972,11 @@ def add_unprocessed_node(layer, node_data):
def process_node(layer, node_data):
"""Reconstruct node by linking to inbound layers
Args:
# Arguments
layer: Layer to process
node_data: List of layer configs
Raises:
# Raises
ValueError: For incorrect layer config
LookupError: If layer required is not found
"""
Expand Down
24 changes: 12 additions & 12 deletions keras/engine/training_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,18 +621,18 @@ def is_sequence(seq):
def should_run_validation(validation_freq, epoch):
"""Checks if validation should be run this epoch.
Arguments:
validation_freq: Integer or list. If an integer, specifies how many training
epochs to run before a new validation run is performed. If a list,
specifies the epochs on which to run validation.
epoch: Integer, the number of the training epoch just completed.
Returns:
Bool, True if validation should be run.
Raises:
ValueError: if `validation_freq` is an Integer and less than 1, or if
it is neither an Integer nor a Sequence.
# Arguments
validation_freq: Integer or list. If an integer, specifies how many training
epochs to run before a new validation run is performed. If a list,
specifies the epochs on which to run validation.
epoch: Integer, the number of the training epoch just completed.
# Returns
Bool, True if validation should be run.
# Raises
ValueError: if `validation_freq` is an Integer and less than 1, or if
it is neither an Integer nor a Sequence.
"""
# `epoch` is 0-indexed internally but 1-indexed in the public API.
one_indexed_epoch = epoch + 1
Expand Down
4 changes: 2 additions & 2 deletions keras/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ class tf_file_io_proxy(object):
recommended to use method `get_filepath(filename)` in tests to make them
pass with and without a real GCS bucket during testing. See example below.
Arguments:
# Arguments
file_io_module: String identifier of the file_io module import to patch. E.g
'keras.engine.saving.tf_file_io'
bucket_name: String identifier of *a real* GCS bucket (with or without the
'gs://' prefix). A bucket name provided with argument precedes what is
specified using the GCS_TEST_BUCKET environment variable.
Example:
# Example
```python
model = Sequential()
model.add(Dense(2, input_shape=(3,)))
Expand Down
2 changes: 1 addition & 1 deletion keras/utils/vis_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def plot_model(model,
expand_nested: whether to expand nested models into clusters.
dpi: dot DPI.
# Returns:
# Returns
A Jupyter notebook Image object if Jupyter is installed.
This enables in-line display of the model plots in notebooks.
"""
Expand Down

0 comments on commit adaed1f

Please sign in to comment.