From d582dcf9579bb3784500a9bc8518f68317badaf7 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 5 Dec 2016 16:37:49 -0800 Subject: [PATCH] Update generated Python Op docs. Change: 141117592 --- .../g3doc/api_docs/python/contrib.learn.md | 240 ++---------------- .../shard4/tf.contrib.learn.DNNClassifier.md | 11 +- .../shard9/tf.contrib.learn.DNNRegressor.md | 229 ++--------------- 3 files changed, 54 insertions(+), 426 deletions(-) diff --git a/tensorflow/g3doc/api_docs/python/contrib.learn.md b/tensorflow/g3doc/api_docs/python/contrib.learn.md index 8ce069d5d40266..403ddb01950413 100644 --- a/tensorflow/g3doc/api_docs/python/contrib.learn.md +++ b/tensorflow/g3doc/api_docs/python/contrib.learn.md @@ -1068,9 +1068,9 @@ altogether. The behavior of this flag is described below. ##### Returns: - Numpy array of predicted classes (or an iterable of predicted classes if - as_iterable is True). Each predicted class is represented by its class - index (i.e. integer from 0 to n_classes-1). + Numpy array of predicted classes with shape [batch_size] (or an iterable + of predicted classes if as_iterable is True). Each predicted class is + represented by its class index (i.e. integer from 0 to n_classes-1). - - - @@ -1098,9 +1098,8 @@ altogether. The behavior of this flag is described below. ##### Returns: - Numpy array of predicted probabilities (or an iterable of predicted - probabilities if as_iterable is True). Each predicted class is represented - by its class index (i.e. integer from 0 to n_classes-1). + Numpy array of predicted probabilities with shape [batch_size, n_classes] + (or an iterable of predicted probabilities if as_iterable is True). - - - @@ -1172,7 +1171,7 @@ Input of `fit` and `evaluate` should have following features, whose `value` is a `Tensor`. - - - -#### `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=False, config=None, feature_engineering_fn=None, label_dimension=1)` {#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=False, config=None, feature_engineering_fn=None, label_dimension=1, embedding_lr_multipliers=None)` {#DNNRegressor.__init__} Initializes a `DNNRegressor` instance. @@ -1209,30 +1208,15 @@ Initializes a `DNNRegressor` instance. returns features and labels which will be fed into the model. * `label_dimension`: Dimension of the label for multilabels. Defaults to 1. +* `embedding_lr_multipliers`: Optional. A dictionary from `EbeddingColumn` to + a `float` multiplier. Multiplier will be used to multiply with + learning rate for the embedding variables. ##### Returns: A `DNNRegressor` estimator. -- - - - -#### `tf.contrib.learn.DNNRegressor.__repr__()` {#DNNRegressor.__repr__} - - - - -- - - - -#### `tf.contrib.learn.DNNRegressor.bias_` {#DNNRegressor.bias_} - -DEPRECATED FUNCTION - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). - - - - - #### `tf.contrib.learn.DNNRegressor.config` {#DNNRegressor.config} @@ -1242,98 +1226,23 @@ This method will be removed after the deprecation date. To inspect variables, us - - - -#### `tf.contrib.learn.DNNRegressor.dnn_bias_` {#DNNRegressor.dnn_bias_} - -Returns bias of deep neural network part. (deprecated) - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). - - -- - - - -#### `tf.contrib.learn.DNNRegressor.dnn_weights_` {#DNNRegressor.dnn_weights_} - -Returns weights of deep neural network part. (deprecated) - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). - - -- - - - -#### `tf.contrib.learn.DNNRegressor.evaluate(*args, **kwargs)` {#DNNRegressor.evaluate} - -See `Evaluable`. (deprecated arguments) - -SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-12-01. -Instructions for updating: -Estimator is decoupled from Scikit Learn interface by moving into -separate class SKCompat. Arguments x, y and batch_size are only -available in the SKCompat class, Estimator will only accept input_fn. - -##### Example conversion: - - est = Estimator(...) -> est = SKCompat(Estimator(...)) - -##### Raises: - - -* `ValueError`: If at least one of `x` or `y` is provided, and at least one of - `input_fn` or `feed_fn` is provided. - Or if `metrics` is not `None` or `dict`. - - -- - - - -#### `tf.contrib.learn.DNNRegressor.export(export_dir, input_fn=None, input_feature_key=None, use_deprecated_input_fn=True, signature_fn=None, default_batch_size=None, exports_to_keep=None)` {#DNNRegressor.export} - +#### `tf.contrib.learn.DNNRegressor.evaluate(x=None, y=None, input_fn=None, feed_fn=None, batch_size=None, steps=None, metrics=None, name=None, checkpoint_path=None)` {#DNNRegressor.evaluate} +See evaluable.Evaluable. - - - -#### `tf.contrib.learn.DNNRegressor.fit(*args, **kwargs)` {#DNNRegressor.fit} - -See `Trainable`. (deprecated arguments) - -SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-12-01. -Instructions for updating: -Estimator is decoupled from Scikit Learn interface by moving into -separate class SKCompat. Arguments x, y and batch_size are only -available in the SKCompat class, Estimator will only accept input_fn. - -##### Example conversion: - - est = Estimator(...) -> est = SKCompat(Estimator(...)) - -##### Raises: - +#### `tf.contrib.learn.DNNRegressor.export(export_dir, input_fn=None, input_feature_key=None, use_deprecated_input_fn=True, signature_fn=None, default_batch_size=1, exports_to_keep=None)` {#DNNRegressor.export} -* `ValueError`: If `x` or `y` are not `None` while `input_fn` is not `None`. -* `ValueError`: If both `steps` and `max_steps` are not `None`. +See BaseEstimator.export. - - - -#### `tf.contrib.learn.DNNRegressor.get_params(deep=True)` {#DNNRegressor.get_params} - -Get parameters for this estimator. - -##### Args: - - -* `deep`: boolean, optional - - If `True`, will return the parameters for this estimator and - contained subobjects that are estimators. +#### `tf.contrib.learn.DNNRegressor.fit(x=None, y=None, input_fn=None, steps=None, batch_size=None, monitors=None, max_steps=None)` {#DNNRegressor.fit} -##### Returns: - - params : mapping of string to any - Parameter names mapped to their values. +See trainable.Trainable. - - - @@ -1360,29 +1269,7 @@ Returns value of the variable given by name. ##### Returns: - Numpy array - value of the tensor. - - -- - - - -#### `tf.contrib.learn.DNNRegressor.linear_bias_` {#DNNRegressor.linear_bias_} - -Returns bias of the linear part. (deprecated) - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). - - -- - - - -#### `tf.contrib.learn.DNNRegressor.linear_weights_` {#DNNRegressor.linear_weights_} - -Returns weights per feature of the linear part. (deprecated) - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). + `Tensor` object. - - - @@ -1392,64 +1279,11 @@ This method will be removed after the deprecation date. To inspect variables, us -- - - - -#### `tf.contrib.learn.DNNRegressor.partial_fit(*args, **kwargs)` {#DNNRegressor.partial_fit} - -Incremental fit on a batch of samples. (deprecated arguments) - -SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-12-01. -Instructions for updating: -Estimator is decoupled from Scikit Learn interface by moving into -separate class SKCompat. Arguments x, y and batch_size are only -available in the SKCompat class, Estimator will only accept input_fn. - -##### Example conversion: - - est = Estimator(...) -> est = SKCompat(Estimator(...)) - -This method is expected to be called several times consecutively -on different or the same chunks of the dataset. This either can -implement iterative training or out-of-core/online training. - -This is especially useful when the whole dataset is too big to -fit in memory at the same time. Or when model is taking long time -to converge, and you want to split up training into subparts. - -##### Args: - - -* `x`: Matrix of shape [n_samples, n_features...]. Can be iterator that - returns arrays of features. The training input samples for fitting the - model. If set, `input_fn` must be `None`. -* `y`: Vector or matrix [n_samples] or [n_samples, n_outputs]. Can be - iterator that returns array of labels. The training label values - (class labels in classification, real numbers in regression). If set, - `input_fn` must be `None`. -* `input_fn`: Input function. If set, `x`, `y`, and `batch_size` must be - `None`. -* `steps`: Number of steps for which to train model. If `None`, train forever. -* `batch_size`: minibatch size to use on the input, defaults to first - dimension of `x`. Must be `None` if `input_fn` is provided. -* `monitors`: List of `BaseMonitor` subclass instances. Used for callbacks - inside the training loop. - -##### Returns: - - `self`, for chaining. - -##### Raises: - - -* `ValueError`: If at least one of `x` and `y` is provided, and `input_fn` is - provided. - - - - - #### `tf.contrib.learn.DNNRegressor.predict(*args, **kwargs)` {#DNNRegressor.predict} -Runs inference to determine the predicted class. (deprecated arguments) +Returns predicted scores for given features. (deprecated arguments) SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-09-15. Instructions for updating: @@ -1457,42 +1291,22 @@ The default behavior of predict() is changing. The default value for as_iterable will change to True, and then the flag will be removed altogether. The behavior of this flag is described below. - -- - - - -#### `tf.contrib.learn.DNNRegressor.set_params(**params)` {#DNNRegressor.set_params} - -Set the parameters of this estimator. - -The method works on simple estimators as well as on nested objects -(such as pipelines). The former have parameters of the form -``__`` so that it's possible to update each -component of a nested object. - ##### Args: -* `**params`: Parameters. +* `x`: features. +* `input_fn`: Input function. If set, x must be None. +* `batch_size`: Override default batch size. +* `as_iterable`: If True, return an iterable which keeps yielding predictions + for each example until inputs are exhausted. Note: The inputs must + terminate if you want the iterable to terminate (e.g. be sure to pass + num_epochs=1 if you are using something like read_batch_features). ##### Returns: - self - -##### Raises: - - -* `ValueError`: If params contain invalid names. - - -- - - - -#### `tf.contrib.learn.DNNRegressor.weights_` {#DNNRegressor.weights_} - -DEPRECATED FUNCTION - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). + Numpy array of predicted scores (or an iterable of predicted scores if + as_iterable is True). If `label_dimension == 1`, the shape of the output + is `[batch_size]`, otherwise the shape is `[batch_size, label_dimension]`. diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.contrib.learn.DNNClassifier.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.contrib.learn.DNNClassifier.md index 3f9e0639d87062..0ad9c0ec1bb706 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.contrib.learn.DNNClassifier.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard4/tf.contrib.learn.DNNClassifier.md @@ -212,9 +212,9 @@ altogether. The behavior of this flag is described below. ##### Returns: - Numpy array of predicted classes (or an iterable of predicted classes if - as_iterable is True). Each predicted class is represented by its class - index (i.e. integer from 0 to n_classes-1). + Numpy array of predicted classes with shape [batch_size] (or an iterable + of predicted classes if as_iterable is True). Each predicted class is + represented by its class index (i.e. integer from 0 to n_classes-1). - - - @@ -242,9 +242,8 @@ altogether. The behavior of this flag is described below. ##### Returns: - Numpy array of predicted probabilities (or an iterable of predicted - probabilities if as_iterable is True). Each predicted class is represented - by its class index (i.e. integer from 0 to n_classes-1). + Numpy array of predicted probabilities with shape [batch_size, n_classes] + (or an iterable of predicted probabilities if as_iterable is True). - - - diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.contrib.learn.DNNRegressor.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.contrib.learn.DNNRegressor.md index cb21bda7fb7146..6176f98c65e8d3 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.contrib.learn.DNNRegressor.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.contrib.learn.DNNRegressor.md @@ -51,7 +51,7 @@ Input of `fit` and `evaluate` should have following features, whose `value` is a `Tensor`. - - - -#### `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=False, config=None, feature_engineering_fn=None, label_dimension=1)` {#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=False, config=None, feature_engineering_fn=None, label_dimension=1, embedding_lr_multipliers=None)` {#DNNRegressor.__init__} Initializes a `DNNRegressor` instance. @@ -88,30 +88,15 @@ Initializes a `DNNRegressor` instance. returns features and labels which will be fed into the model. * `label_dimension`: Dimension of the label for multilabels. Defaults to 1. +* `embedding_lr_multipliers`: Optional. A dictionary from `EbeddingColumn` to + a `float` multiplier. Multiplier will be used to multiply with + learning rate for the embedding variables. ##### Returns: A `DNNRegressor` estimator. -- - - - -#### `tf.contrib.learn.DNNRegressor.__repr__()` {#DNNRegressor.__repr__} - - - - -- - - - -#### `tf.contrib.learn.DNNRegressor.bias_` {#DNNRegressor.bias_} - -DEPRECATED FUNCTION - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). - - - - - #### `tf.contrib.learn.DNNRegressor.config` {#DNNRegressor.config} @@ -121,98 +106,23 @@ This method will be removed after the deprecation date. To inspect variables, us - - - -#### `tf.contrib.learn.DNNRegressor.dnn_bias_` {#DNNRegressor.dnn_bias_} +#### `tf.contrib.learn.DNNRegressor.evaluate(x=None, y=None, input_fn=None, feed_fn=None, batch_size=None, steps=None, metrics=None, name=None, checkpoint_path=None)` {#DNNRegressor.evaluate} -Returns bias of deep neural network part. (deprecated) - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). +See evaluable.Evaluable. - - - -#### `tf.contrib.learn.DNNRegressor.dnn_weights_` {#DNNRegressor.dnn_weights_} - -Returns weights of deep neural network part. (deprecated) +#### `tf.contrib.learn.DNNRegressor.export(export_dir, input_fn=None, input_feature_key=None, use_deprecated_input_fn=True, signature_fn=None, default_batch_size=1, exports_to_keep=None)` {#DNNRegressor.export} -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). +See BaseEstimator.export. - - - -#### `tf.contrib.learn.DNNRegressor.evaluate(*args, **kwargs)` {#DNNRegressor.evaluate} - -See `Evaluable`. (deprecated arguments) - -SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-12-01. -Instructions for updating: -Estimator is decoupled from Scikit Learn interface by moving into -separate class SKCompat. Arguments x, y and batch_size are only -available in the SKCompat class, Estimator will only accept input_fn. - -##### Example conversion: - - est = Estimator(...) -> est = SKCompat(Estimator(...)) - -##### Raises: - - -* `ValueError`: If at least one of `x` or `y` is provided, and at least one of - `input_fn` or `feed_fn` is provided. - Or if `metrics` is not `None` or `dict`. - - -- - - - -#### `tf.contrib.learn.DNNRegressor.export(export_dir, input_fn=None, input_feature_key=None, use_deprecated_input_fn=True, signature_fn=None, default_batch_size=None, exports_to_keep=None)` {#DNNRegressor.export} - - - - -- - - - -#### `tf.contrib.learn.DNNRegressor.fit(*args, **kwargs)` {#DNNRegressor.fit} - -See `Trainable`. (deprecated arguments) - -SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-12-01. -Instructions for updating: -Estimator is decoupled from Scikit Learn interface by moving into -separate class SKCompat. Arguments x, y and batch_size are only -available in the SKCompat class, Estimator will only accept input_fn. - -##### Example conversion: - - est = Estimator(...) -> est = SKCompat(Estimator(...)) - -##### Raises: - - -* `ValueError`: If `x` or `y` are not `None` while `input_fn` is not `None`. -* `ValueError`: If both `steps` and `max_steps` are not `None`. - - -- - - - -#### `tf.contrib.learn.DNNRegressor.get_params(deep=True)` {#DNNRegressor.get_params} - -Get parameters for this estimator. - -##### Args: - - -* `deep`: boolean, optional - - If `True`, will return the parameters for this estimator and - contained subobjects that are estimators. +#### `tf.contrib.learn.DNNRegressor.fit(x=None, y=None, input_fn=None, steps=None, batch_size=None, monitors=None, max_steps=None)` {#DNNRegressor.fit} -##### Returns: - - params : mapping of string to any - Parameter names mapped to their values. +See trainable.Trainable. - - - @@ -239,29 +149,7 @@ Returns value of the variable given by name. ##### Returns: - Numpy array - value of the tensor. - - -- - - - -#### `tf.contrib.learn.DNNRegressor.linear_bias_` {#DNNRegressor.linear_bias_} - -Returns bias of the linear part. (deprecated) - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). - - -- - - - -#### `tf.contrib.learn.DNNRegressor.linear_weights_` {#DNNRegressor.linear_weights_} - -Returns weights per feature of the linear part. (deprecated) - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). + `Tensor` object. - - - @@ -271,64 +159,11 @@ This method will be removed after the deprecation date. To inspect variables, us -- - - - -#### `tf.contrib.learn.DNNRegressor.partial_fit(*args, **kwargs)` {#DNNRegressor.partial_fit} - -Incremental fit on a batch of samples. (deprecated arguments) - -SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-12-01. -Instructions for updating: -Estimator is decoupled from Scikit Learn interface by moving into -separate class SKCompat. Arguments x, y and batch_size are only -available in the SKCompat class, Estimator will only accept input_fn. - -##### Example conversion: - - est = Estimator(...) -> est = SKCompat(Estimator(...)) - -This method is expected to be called several times consecutively -on different or the same chunks of the dataset. This either can -implement iterative training or out-of-core/online training. - -This is especially useful when the whole dataset is too big to -fit in memory at the same time. Or when model is taking long time -to converge, and you want to split up training into subparts. - -##### Args: - - -* `x`: Matrix of shape [n_samples, n_features...]. Can be iterator that - returns arrays of features. The training input samples for fitting the - model. If set, `input_fn` must be `None`. -* `y`: Vector or matrix [n_samples] or [n_samples, n_outputs]. Can be - iterator that returns array of labels. The training label values - (class labels in classification, real numbers in regression). If set, - `input_fn` must be `None`. -* `input_fn`: Input function. If set, `x`, `y`, and `batch_size` must be - `None`. -* `steps`: Number of steps for which to train model. If `None`, train forever. -* `batch_size`: minibatch size to use on the input, defaults to first - dimension of `x`. Must be `None` if `input_fn` is provided. -* `monitors`: List of `BaseMonitor` subclass instances. Used for callbacks - inside the training loop. - -##### Returns: - - `self`, for chaining. - -##### Raises: - - -* `ValueError`: If at least one of `x` and `y` is provided, and `input_fn` is - provided. - - - - - #### `tf.contrib.learn.DNNRegressor.predict(*args, **kwargs)` {#DNNRegressor.predict} -Runs inference to determine the predicted class. (deprecated arguments) +Returns predicted scores for given features. (deprecated arguments) SOME ARGUMENTS ARE DEPRECATED. They will be removed after 2016-09-15. Instructions for updating: @@ -336,41 +171,21 @@ The default behavior of predict() is changing. The default value for as_iterable will change to True, and then the flag will be removed altogether. The behavior of this flag is described below. - -- - - - -#### `tf.contrib.learn.DNNRegressor.set_params(**params)` {#DNNRegressor.set_params} - -Set the parameters of this estimator. - -The method works on simple estimators as well as on nested objects -(such as pipelines). The former have parameters of the form -``__`` so that it's possible to update each -component of a nested object. - ##### Args: -* `**params`: Parameters. +* `x`: features. +* `input_fn`: Input function. If set, x must be None. +* `batch_size`: Override default batch size. +* `as_iterable`: If True, return an iterable which keeps yielding predictions + for each example until inputs are exhausted. Note: The inputs must + terminate if you want the iterable to terminate (e.g. be sure to pass + num_epochs=1 if you are using something like read_batch_features). ##### Returns: - self - -##### Raises: - - -* `ValueError`: If params contain invalid names. - - -- - - - -#### `tf.contrib.learn.DNNRegressor.weights_` {#DNNRegressor.weights_} - -DEPRECATED FUNCTION - -THIS FUNCTION IS DEPRECATED. It will be removed after 2016-10-30. -Instructions for updating: -This method will be removed after the deprecation date. To inspect variables, use get_variable_names() and get_variable_value(). + Numpy array of predicted scores (or an iterable of predicted scores if + as_iterable is True). If `label_dimension == 1`, the shape of the output + is `[batch_size]`, otherwise the shape is `[batch_size, label_dimension]`.