Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Exception in the Custom model example #176

Closed
mhjabreel opened this issue Jun 12, 2016 · 2 comments
Closed

Exception in the Custom model example #176

mhjabreel opened this issue Jun 12, 2016 · 2 comments

Comments

@mhjabreel
Copy link

Hi,

I have tried running the custom model example and i got the following exception

Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 160, in fit
monitors=monitors)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 449, in _train_model
train_op, loss_op = self._get_train_ops(features, targets)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 673, in _get_train_ops
_, loss, train_op = self._call_model_fn(features, targets, ModeKeys.TRAIN)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 656, in _call_model_fn
features, targets, mode=mode)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/learn/python/learn/estimators/base.py", line 369, in _model_fn
predictions, loss = model_fn(features, targets)
File "", line 3, in my_model
TypeError: dnn() got an unexpected keyword argument 'keep_prob'

Any ideas what might be causing this?

@ilblackdragon
Copy link
Contributor

Which example did you run? Please use examples from https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/skflow
Also if something doesn't work, please post in that repo (this repo is inactive at this point).

@ilblackdragon
Copy link
Contributor

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/skflow/iris_custom_model.py shows how to use new tf.contrib.layers for dnn with dropout.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants