---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-24-49deb9779651> in <module>()
1 for n in range(5):
----> 2 model.train(input_fn=lambda: input_fn(
3 train_path, 2, True, 5))
~/anaconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py in train(self, input_fn, hooks, steps, max_steps, saving_listeners)
300
301 saving_listeners = _check_listeners_type(saving_listeners)
--> 302 loss = self._train_model(input_fn, hooks, saving_listeners)
303 logging.info('Loss for final step: %s.', loss)
304 return self
~/anaconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py in _train_model(self, input_fn, hooks, saving_listeners)
709 with ops.control_dependencies([global_step_read_tensor]):
710 estimator_spec = self._call_model_fn(
--> 711 features, labels, model_fn_lib.ModeKeys.TRAIN, self.config)
712 # Check if the user created a loss summary, and add one if they didn't.
713 # We assume here that the summary is called 'loss'. If it is not, we will
~/anaconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/estimator/estimator.py in _call_model_fn(self, features, labels, mode, config)
692 if 'config' in model_fn_args:
693 kwargs['config'] = config
--> 694 model_fn_results = self._model_fn(features=features, **kwargs)
695
696 if not isinstance(model_fn_results, model_fn_lib.EstimatorSpec):
~/anaconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/estimator/canned/linear.py in _model_fn(features, labels, mode, config)
251 optimizer=optimizer,
252 partitioner=partitioner,
--> 253 config=config)
254 super(LinearClassifier, self).__init__(
255 model_fn=_model_fn,
~/anaconda3/envs/tf14/lib/python3.5/site-packages/tensorflow/python/estimator/canned/linear.py in _linear_model_fn(features, labels, mode, head, feature_columns, optimizer, partitioner, config)
98 if not isinstance(features, dict):
99 raise ValueError('features should be a dictionary of `Tensor`s. '
--> 100 'Given type: {}'.format(type(features)))
101 optimizer = optimizers.get_optimizer_instance(
102 optimizer or _get_default_optimizer(feature_columns),
ValueError: features should be a dictionary of `Tensor`s. Given type: <class 'tensorflow.python.data.ops.dataset_ops.BatchDataset'>