LostTech.TensorFlow : API Documentation

Type DNNLinearCombinedEstimator

Namespace tensorflow.contrib.learn

Parent Estimator

Interfaces IDNNLinearCombinedEstimator

An estimator for TensorFlow Linear and DNN joined training models.

THIS CLASS IS DEPRECATED. See [contrib/learn/README.md](https://www.tensorflow.org/code/tensorflow/contrib/learn/README.md) for general migration instructions.

Note: New users must set `fix_global_step_increment_bug=True` when creating an estimator.

Input of `fit`, `train`, and `evaluate` should have following features, otherwise there will be a `KeyError`: if `weight_column_name` is not `None`, a feature with `key=weight_column_name` whose value is a `Tensor`. for each `column` in `dnn_feature_columns` + `linear_feature_columns`: - if `column` is a `SparseColumn`, a feature with `key=column.name` whose `value` is a `SparseTensor`. - if `column` is a `WeightedSparseColumn`, two features: the first with `key` the id column name, the second with `key` the weight column name. Both features' `value` must be a `SparseTensor`. - if `column` is a `RealValuedColumn, a feature with `key=column.name` whose `value` is a `Tensor`.

Methods

Properties

Public static methods

DNNLinearCombinedEstimator NewDyn(object head, object model_dir, object linear_feature_columns, object linear_optimizer, ImplicitContainer<T> _joint_linear_weights, object dnn_feature_columns, object dnn_optimizer, object dnn_hidden_units, object dnn_activation_fn, object dnn_dropout, object gradient_clip_norm, object config, object feature_engineering_fn, object embedding_lr_multipliers, ImplicitContainer<T> fix_global_step_increment_bug, object input_layer_partitioner)

Initializes a DNNLinearCombinedEstimator instance. (deprecated argument values)

Warning: SOME ARGUMENT VALUES ARE DEPRECATED: `(fix_global_step_increment_bug=False)`. They will be removed after 2017-04-15. Instructions for updating: Please set fix_global_step_increment_bug=True and update training steps in your pipeline. See pydoc for details.

Note: New users must set `fix_global_step_increment_bug=True` when creating an estimator.
Parameters
object head
A _Head object.
object 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.
object linear_feature_columns
An iterable containing all the feature columns used by linear part of the model. All items in the set should be instances of classes derived from `FeatureColumn`.
object linear_optimizer
An instance of `tf.Optimizer` used to apply gradients to the linear part of the model. If `None`, will use a FTRL optimizer.
ImplicitContainer<T> _joint_linear_weights
If True will use a single (possibly partitioned) variable to store all weights for the linear model. More efficient if there are many columns, however requires all columns are sparse and have the 'sum' combiner.
object dnn_feature_columns
An iterable containing all the feature columns used by deep part of the model. All items in the set should be instances of classes derived from `FeatureColumn`.
object dnn_optimizer
An instance of `tf.Optimizer` used to apply gradients to the deep part of the model. If `None`, will use an Adagrad optimizer.
object dnn_hidden_units
List of hidden units per layer. All layers are fully connected.
object dnn_activation_fn
Activation function applied to each layer. If `None`, will use tf.nn.relu.
object dnn_dropout
When not None, the probability we will drop out a given coordinate.
object 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.
object config
RunConfig object to configure the runtime settings.
object feature_engineering_fn
Feature engineering function. Takes features and labels which are the output of `input_fn` and returns features and labels which will be fed into the model.
object embedding_lr_multipliers
Optional. A dictionary from `EmbeddingColumn` to a `float` multiplier. Multiplier will be used to multiply with learning rate for the embedding variables.
ImplicitContainer<T> fix_global_step_increment_bug
If `False`, the estimator needs two fit steps to optimize both linear and dnn parts. If `True`, this bug is fixed. New users must set this to `True`, but the default value is `False` for backwards compatibility.
object input_layer_partitioner
Optional. Partitioner for input layer.

Public properties

object config get;

object config_dyn get;

string model_dir get;

object model_dir_dyn get;

object model_fn get;

object model_fn_dyn get;

object PythonObject get;