-
Notifications
You must be signed in to change notification settings - Fork 5
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
I am having trouble using your repo due to vague module versions. #2
Comments
About requirements.txt: About Example code: About .tiff file |
opencv-python 4.1.1 did not seem to exist but this was close and installed fine. I found that Keras 2.2.4 is giving this import error. I am running the example (Example.ipynb) in VSCode after installing everything but it gets the following error. ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-f457f0f1cf48> in <module>
----> 1 import Secreit
2 from keras.preprocessing import image
3 import numpy as np
4 from matplotlib import pyplot as plt
5 import matplotlib as mpl
d:\Google Drive\Coding\Python\Scripts\Secreit\Secreit.py in <module>
----> 1 from keras import models
2 from keras import layers
3 import pickle
4 from keras.applications import VGG16
5 from keras import optimizers
ModuleNotFoundError: No module named 'keras' |
Are you using Anaconda? I tried using the following versions using a venv. numpy==1.19.1
opencv-python==4.1.1.26 # 4.1.1 did not exist
keras==2.2.4
tensorflow==2.2.0 A Pip freeze output might help from your working environment. |
Do you really install keras?? You should reinstall keras and type "import keras" to check whether you install it correctly. |
This is so strange. I installed again and same error. >>> import keras
Using TensorFlow backend.
2020-12-18 13:56:47.936810: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll |
How about "from keras import models" How about copying and pasting all the Secreit.py and use it without importing Secreit. |
How are you running the Example.ipynb file? It is getting further without errors but now this comes up RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead. due to this line. grads = K.gradients(P_output, last_conv_layer.output)[0] |
I`m using Anaconda, not VENV. |
Keras 2.2.4 does not work well with tensorflow 2.0 (keras-team/keras#12379). numpy==1.19.1 However, when I try to run the jupyter notebook with the E.png, i get the following error:ValueError Traceback (most recent call last) ValueError: cannot convert float NaN to integer When I add print(predict), the output is [ 0. nan 0.] |
It was caused by "inf". Now I fixed Secreit.py. |
Would you be able to add a requirements.txt with the exact versions you used.
I tried using the following module versions and python 3.6.
numpy==1.19.3
keras==2.2.4
opencv-python
tensorflow==2.0
I am also unsure how to fully run the code as the instructions are not very in depth for someone at my level.
Can you give an example of the commands used to determine the estrus stage of an image that the user submits? Additionally, do the images have to be in .png format or can they be .tiff?
Thanks!
The text was updated successfully, but these errors were encountered: