tf.contrib.learn.Estimator.__init__(model_fn=None, model_dir=None, config=None, params=None, feature_engineering_fn=None)
Constructs an Estimator instance.
Args:
- 
model_fn: Model function, takes features and targets tensors or dicts of tensors and returns predictions and loss tensors. Supports next three signatures for the function:(features, targets) -> (predictions, loss, train_op)(features, targets, mode) -> (predictions, loss, train_op)(features, targets, mode, params) -> (predictions, loss, train_op)
Where
- 
featuresare singleTensorordictofTensors (depending on data passed tofit), - 
targetsareTensorordictofTensors (for multi-head models). If mode isModeKeys.INFER,targets=Nonewill be passed. If themodel_fn's signature does not acceptmode, themodel_fnmust still be able to handletargets=None. - 
moderepresents if this training, evaluation or prediction. SeeModeKeys. - 
paramsis adictof hyperparameters. Will receive what is passed to Estimator inparamsparameter. This allows to configure Estimators from hyper parameter tunning. 
 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.config: Configuration object.params:dictof hyper parameters that will be passed intomodel_fn. Keys are names of parameters, values are basic python types.feature_engineering_fn: Feature engineering function. Takes features and targets which are the output ofinput_fnand returns features and targets which will be fed intomodel_fn. Please checkmodel_fnfor a definition of features and targets.
Raises:
- 
ValueError: parameters ofmodel_fndon't matchparams. 
Please login to continue.