Fix reference in HParams docstring.

In the tf.contrib.training.HParams.HParams class docstring, `tf.HParams` should be `tf.contrib.training.HParams`. (I don't think there currently exists a `tf.HParams` alias.)
This commit is contained in:
Brandon Carter 2019-02-25 18:04:03 -05:00 committed by GitHub
parent 3659c6435c
commit fd7bcb4eb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,8 +353,10 @@ class HParams(object):
def my_program():
# Create a HParams object specifying the names and values of the
# model hyperparameters:
hparams = tf.HParams(learning_rate=0.1, num_hidden_units=100,
activations=['relu', 'tanh'])
hparams = tf.contrib.training.HParams(
learning_rate=0.1,
num_hidden_units=100,
activations=['relu', 'tanh'])
# Override hyperparameters values by parsing the command line
hparams.parse(args.hparams)
@ -387,7 +389,7 @@ class HParams(object):
# Define 3 hyperparameters: 'learning_rate' is a float parameter,
# 'num_hidden_units' an integer parameter, and 'activation' a string
# parameter.
hparams = tf.HParams(
hparams = tf.contrib.training.HParams(
learning_rate=0.1, num_hidden_units=100, activation='relu')
hparams.activation ==> 'relu'