tf.contrib.learn.DNNRegressor.__init__()

tf.contrib.learn.DNNRegressor.__init__(hidden_units, feature_columns, model_dir=None, weight_column_name=None, optimizer=None, activation_fn=relu, dropout=None, gradient_clip_norm=None, enable_centered_bias=None, config=None)

Initializes a DNNRegressor instance.

Args:
  • hidden_units: List of hidden units per layer. All layers are fully connected. Ex. [64, 32] means first layer has 64 nodes and second one has 32.
  • feature_columns: An iterable containing all the feature columns used by the model. All items in the set should be instances of classes derived from FeatureColumn.
  • model_dir: Directory to save model parameters, graph and etc. This can also be used to load checkpoints from the directory into a estimator to continue training a previously saved model.
  • weight_column_name: A string defining feature column name representing weights. It is used to down weight or boost examples during training. It will be multiplied by the loss of the example.
  • optimizer: An instance of tf.Optimizer used to train the model. If None, will use an Adagrad optimizer.
  • activation_fn: Activation function applied to each layer. If None, will use tf.nn.relu.
  • dropout: When not None, the probability we will drop out a given coordinate.
  • gradient_clip_norm: A float > 0. If provided, gradients are clipped to their global norm with this clipping ratio. See tf.clip_by_global_norm for more details.
  • enable_centered_bias: A bool. If True, estimator will learn a centered bias variable for each class. Rest of the model structure learns the residual after centered bias.
  • config: RunConfig object to configure the runtime settings.
Returns:

A DNNRegressor estimator.

doc_TensorFlow
2016-10-14 13:05:41
Comments
Leave a Comment

Please login to continue.