Open futuramark opened 5 years ago
That's odd, I just tested, it works fine for me, so I'm guessing we don't have the same library versions. Could you please update tensorflow and tensorflow_estimator to the latest versions?
pip3 install -U tensorflow
pip3 install -U tensorflow_estimator
pip3 freeze | grep tensorflow
This should install the latest version and display their versions. You should see these versions:
tensorflow==1.13.1
tensorflow-estimator==1.13.0
I have upgraded tensorflow and tensorflow_estimator...but this is where the problem is coming from i think the estimator.. pip3 never worked for me so i used normal pip. tensorflow is 1.13.0 tensorflow_estimator 1.13.0 [image: image.png]
On Tue, Apr 9, 2019 at 4:09 PM Aurélien Geron notifications@github.com wrote:
That's odd, I just tested, it works fine for me, so I'm guessing we don't have the same library versions. Could you please update tensorflow and tensorflow_estimator to the latest versions?
pip3 install -U tensorflow pip3 install -U tensorflow_estimator pip3 freeze | grep tensorflow
This should install the latest version and display their versions. You should see these versions:
tensorflow==1.13.1 tensorflow-estimator==1.13.0
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ageron/handson-ml/issues/400#issuecomment-481267903, or mute the thread https://github.com/notifications/unsubscribe-auth/AhuYw3XSMznUT_uWJhNBDqvQinSI88t5ks5vfJ8ngaJpZM4ciV13 .
pip freeze | grep tensorflow 'grep' is not recognized as an internal or external command, operable program or batch file.
On Tue, Apr 9, 2019 at 5:42 PM My Name markhome1980@gmail.com wrote:
I have upgraded tensorflow and tensorflow_estimator...but this is where the problem is coming from i think the estimator.. pip3 never worked for me so i used normal pip. tensorflow is 1.13.0 tensorflow_estimator 1.13.0 [image: image.png]
On Tue, Apr 9, 2019 at 4:09 PM Aurélien Geron notifications@github.com wrote:
That's odd, I just tested, it works fine for me, so I'm guessing we don't have the same library versions. Could you please update tensorflow and tensorflow_estimator to the latest versions?
pip3 install -U tensorflow pip3 install -U tensorflow_estimator pip3 freeze | grep tensorflow
This should install the latest version and display their versions. You should see these versions:
tensorflow==1.13.1 tensorflow-estimator==1.13.0
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ageron/handson-ml/issues/400#issuecomment-481267903, or mute the thread https://github.com/notifications/unsubscribe-auth/AhuYw3XSMznUT_uWJhNBDqvQinSI88t5ks5vfJ8ngaJpZM4ciV13 .
Hi @futuramark , Are you using Windows? What version? What version of Python are you using? Could you please start a python shell and run this:
import sys
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
print(tf.__version__)
print(sys.version_info)
mnist = input_data.read_data_sets("/tmp/data/")
from sklearn import datasets
Then please copy/paste the full output here (you can add ``` before and after the code to make it look good).
I am using windows 10..python 3 and anaconda.
from tensorflow.examples.tutorials.mnist import input_data
from tensorflow_estimator.python.estimator import model_fn ImportError: cannot import name 'model_fn' from 'tensorflow_estimator.python.estimator' (unknown location)
this line gives an error. the one i mentioned.
On Wed, Apr 10, 2019 at 4:34 AM Aurélien Geron notifications@github.com wrote:
Hi @futuramark https://github.com/futuramark , Are you using Windows? What version? What version of Python are you using? Could you please start a python shell and run this:
import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_dataprint(tf.version) mnist = input_data.read_data_sets("/tmp/data/")from sklearn import datasets
Then please copy/paste the full output here (you can add ``` before and after the code to make it look good).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ageron/handson-ml/issues/400#issuecomment-481509986, or mute the thread https://github.com/notifications/unsubscribe-auth/AhuYw99DdeL-riQZLCctSxUgeWJrojPYks5vfU2ogaJpZM4ciV13 .
Hi @futuramark ,
I see that you sent an image in a previous comment, but the image is not displayed (github filters images out when they are sent by email, you need to go to github.com to upload it).
Also, you initially mentioned that the problem occurred when running this code:
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/")
from sklearn import datasets
But now you are mentioning an additional line of code:
from tensorflow_estimator.python.estimator import model_fn
It makes more sense given the error message, but what I don't understand is that this code is not in chapter 15, or in the Jupyter notebooks. So I'm not sure where you ran into it, but it's not in my book. Perhaps you copied it there by mistake? If so, just remove it and make sure you are using the latest version of the notebook.
Hope this helps.
This code is not running i tried to send an image to show you. The problem seems to be tensorflow estimator even though i am sure it is installed
On Wed, 10 Apr 2019, 04:34 Aurélien Geron, notifications@github.com wrote:
Hi @futuramark https://github.com/futuramark , Are you using Windows? What version? What version of Python are you using? Could you please start a python shell and run this:
import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_dataprint(tf.version) mnist = input_data.read_data_sets("/tmp/data/")from sklearn import datasets
Then please copy/paste the full output here (you can add ``` before and after the code to make it look good).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ageron/handson-ml/issues/400#issuecomment-481509986, or mute the thread https://github.com/notifications/unsubscribe-auth/AhuYw99DdeL-riQZLCctSxUgeWJrojPYks5vfU2ogaJpZM4ciV13 .
Did you try to delete the line?
from tensorflow_estimator.python.estimator import model_fn
HI,
By the way well done for the book. It is great I only had minor issues. However this is one issue I can't solve. That is not a line of code but an error message. I think I have some issue with tensorflow_estimator as if it is not installed correctly however i checked the version it is ok i re install i upgraded it to no avail.
On Thu, Apr 11, 2019 at 4:31 AM Aurélien Geron notifications@github.com wrote:
Did you try to delete the line?
from tensorflow_estimator.python.estimator import model_fn
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ageron/handson-ml/issues/400#issuecomment-481941303, or mute the thread https://github.com/notifications/unsubscribe-auth/AhuYwzQSiaqOhurU_SkAB_85YSvMnWESks5vfp6BgaJpZM4ciV13 .
It would help if I could see the full error stacktrace, showing the exact file and line where the exception was raised. Could you please copy/paste the full stacktrace here?
I dont know exactly.how to do that..?
On Thu, 11 Apr 2019, 15:27 Aurélien Geron, notifications@github.com wrote:
It would help if I could see the full error stacktrace, showing the exact file and line where the exception was raised. Could you please copy/paste the full stacktrace here?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ageron/handson-ml/issues/400#issuecomment-482113339, or mute the thread https://github.com/notifications/unsubscribe-auth/AhuYwyMo4eNSAZ4CVqcQvkVjOuhaHD5lks5vfzgmgaJpZM4ciV13 .
I will paste all the error later. Thanks
On Thu, 11 Apr 2019, 15:28 My Name, markhome1980@gmail.com wrote:
I dont know exactly.how to do that..?
On Thu, 11 Apr 2019, 15:27 Aurélien Geron, notifications@github.com wrote:
It would help if I could see the full error stacktrace, showing the exact file and line where the exception was raised. Could you please copy/paste the full stacktrace here?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ageron/handson-ml/issues/400#issuecomment-482113339, or mute the thread https://github.com/notifications/unsubscribe-auth/AhuYwyMo4eNSAZ4CVqcQvkVjOuhaHD5lks5vfzgmgaJpZM4ciV13 .
For example, if I run a bad command like this:
>>> import tensorflow as tf
>>> tf.exp("bad argument")
I get an error like this:
>>> tf.exp("bad argument")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../tensorflow/python/ops/gen_math_ops.py", line 3758, in exp
x, name=name, ctx=_ctx)
File ".../tensorflow/python/ops/gen_math_ops.py", line 3807, in exp_eager_fallback
ctx=_ctx, name=name)
File ".../tensorflow/python/eager/execute.py", line 66, in quick_execute
six.raise_from(core._status_to_exception(e.code, message), None)
File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InternalError: Could not find valid device for node.
Node: {{node Exp}}
All kernels registered for op Exp :
device='CPU'; T in [DT_FLOAT]
device='CPU'; T in [DT_HALF]
device='CPU'; T in [DT_DOUBLE]
device='CPU'; T in [DT_COMPLEX64]
device='CPU'; T in [DT_COMPLEX128]
[Op:Exp]
This is called the stacktrace. That's what I need you to copy/paste for me, please.
from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/tmp/data/")
This is where i get the error, could it be because i am not cloning your data with git.? and the full error is:-
---------------------------------------------------------------------------ImportError
Traceback (most recent call
last)
The error message seems to indicate that the tensorflow_estimator.python.estimator
package exists but it does not contain a module named model_fn
.
If tensorflow_estimator
did not exist, or if tensorflow_estimator.python
or tensorflow_estimator.python.estimator
did not exist, you would get a ModuleNotFoundError
exception, not an ImportError
, for example:
>>> from tensorflow_estimator.does_not_exist import model_fn
[...]
ModuleNotFoundError: No module named 'tensorflow_estimator.does_not_exist'
I checked the TensorFlow Estimator source code: it seems that model_fn.py
was not at that location in tensorflow_estimator version 1.12. So I'm guessing you have an old version of tensorflow_estimator, somehow.
Perhaps try to uninstall tensorflow and tensorflow_estimator completely (from Anaconda, and perhaps pip, I'm not sure how everything is installed on your machine), and try to reinstall them cleanly (tensorflow version 1.13.1 and tensorflow-estimator version 1.13.0).
Thanks Aurelien I will definetely try that. I think it is also something to do with tensorflow-estimator.
Love the book really enjoyed it and learned a lot. Thanks Mark.
On Fri, Apr 12, 2019 at 7:36 AM Aurélien Geron notifications@github.com wrote:
The error message seems to indicate that the tensorflow_estimator.python.estimator package exists but it does not contain a module named model_fn.
If tensorflow_estimator did not exist, or if tensorflow_estimator.python or tensorflow_estimator.python.estimator did not exist, you would get a ModuleNotFoundError exception, not an ImportError, for example:
from tensorflow_estimator.does_not_exist import model_fn [...] ModuleNotFoundError: No module named 'tensorflow_estimator.does_not_exist'
I checked the TensorFlow Estimator source code: it seems that model_fn.py was not at that location in tensorflow_estimator version 1.12. So I'm guessing you have an old version of tensorflow_estimator, somehow. Perhaps try to uninstall tensorflow and tensorflow_estimator completely (from Anaconda, and perhaps pip, I'm not sure how everything is installed on your machine), and try to reinstall them cleanly (tensorflow version 1.13.1 and tensorflow-estimator version 1.13.0).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ageron/handson-ml/issues/400#issuecomment-482443803, or mute the thread https://github.com/notifications/unsubscribe-auth/AhuYwxVgG8A8mjjuXO45MHX-BuoyYHTxks5vgBtygaJpZM4ciV13 .
Having issues with chapter 15 autoencoders
IS it something from the dataset not being available anymore..or from my library installation>? When I input these lines i get the error:-