New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"ValueError: features should be a dictionary of Tensor
s. Given type: <class 'tensorflow.python.data.ops.dataset_ops.BatchDataset'>"
#3331
Comments
Tensorflow is out of date. Try upgrading to 1.5. |
Can confirm, that updating to TF 1.5 fixes this issue. Still - it's really ugly to have an exception in a tutorial script if you use TF 1.4 instead of the newest 1.5 version... No deprecation warning, nothing. Just a hard crash. |
I saw this error too (1.4). If you don't want to (can't for some reason) upgrade to 1.5, you can correct this error in the iris_data.py eval_input_fn. Instead of return dataset, you can return dataset.make_one_shot_iterator().get_next(). The error message gives you clues, but unfortunately, it doesn't give you the exact spot to look for. |
Also, I believe this issue can be closed. |
One thing i'd suggest - update the tutorial to say minimum requirements of 1.5. It currently says 1.4. |
Thank you for your suggestions. I will try @jkim19's suggestion. If it doesn't work, I guess I will need to upgrade TF. |
I tried @jkim19 method, but still have the same error |
Change the "return" does not fix it. I can only use 1.4.1 at this time. @jkim19 would you please help more further? Thanks a lot. |
Hi, sorry about that. You also have to change the return of train_input_fn to dataset.make_one_shot_iterator().get_next(). Both train_input_fn and eval_input_fn need to return this rather than just dataset. I was using a local train function and forgot about that until the last couple comments. Remember this is only 1.4 and looking at the previous comments it looks like 1.5 doesn't have this issue. Good Luck! Hope this helps. |
Upgrading to tensorflow1.5 did not fix the issue for me. I'm using tensorflow on Windows10 (installed using pip3 and using python3.6). |
@jkim19 So nice. It works well for me now. That's cool. Thumbs up! |
@jkim19 Thanks, that works now. It gives a warning.
But at least it works. |
Issue still exists in the tutorial (and I couldn't find a repo for the doc to update the version in) |
definitely a bug.....so confused |
If you need to use TF version 1.4 you can clone the git repo as it instructs in the tutorial and then checkout version 1.4.0. The scripts then work as advertised, eg:
Then run the premade and other example python scripts. Hope this helps. |
This issue still exists for me. I cloned the example code just today, and I am also using tensorflow 1.4.0 Honest question: how am I supposed to learn how to use tensorflow if the example code is broken? Feeling very discouraged. |
System information
(tensorflow) $ python premade_estimator.py
Describe the problem
I installed tensorflow with Virtualenv. Then, I tried to run premade_estimator.py. However I get the following error:
The text was updated successfully, but these errors were encountered: