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
tf.contrib.slim is not worked in tensorflow 2.0 what is the alternative for that? #8020
Comments
https://github.com/google-research/tf-slim |
hi again it is giving the following error
import tf_slim as slim
File "/usr/local/lib/python3.6/dist-packages/tf_slim/__init__.py", line
23, in <module>
from tf_slim import evaluation
File "/usr/local/lib/python3.6/dist-packages/tf_slim/evaluation.py", line
131, in <module>
from tensorflow.contrib.training.python.training import evaluation
ModuleNotFoundError: No module named 'tensorflow.contrib'
…On Thu, Jan 9, 2020 at 12:35 PM Hongkun Yu ***@***.***> wrote:
https://github.com/google-research/tf-slim
Slim has a mirror outside TF now. To use it with TF2 in compatible mode,
you should install it as a package.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8020?email_source=notifications&email_token=AKDKCK6KZDAIT7OXNJCJAZDQ46DCLA5CNFSM4KEVSUJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIRV5UY#issuecomment-572743379>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKDKCK55JV5GLWAT57SYM63Q46DCLANCNFSM4KEVSUJQ>
.
|
All contrib usage need to go away. |
I had a similar error when importing evaluation. Go to "https://github.com/google-research/tf-slim/tree/master/tf_slim" and download evaluation.py in some directory and include that directory in your path. That solved the error for me |
Hi dragonsan17, could you elaborate how do you replace eval_util.py with evaluation.py in tf_slim? I don't think they are equivalent, are they? I got stuck between tf-1.5 and tf-2.1: if run in tf-1.5, I have "compat.v1" issue, and if run in tf-2.1, I have "no contrib" issue. I am highly interested on how do you solve the 'no contrib' issue running in tf-2.1. Thanks in advance for your help. |
The link I mentioned above contains files which you can assume to be inside "tf.contrib.python". And then you can import training.evaluation from it |
Is this still an issue?. Please, close this thread if your issue was resolved.Thanks! |
Automatically closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks! |
Please go to Stack Overflow for help and support:
http://stackoverflow.com/questions/tagged/tensorflow
Also, please understand that many of the models included in this repository are experimental and research-style code. If you open a GitHub issue, here is our policy:
Here's why we have that policy: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.
System information
You can collect some of this information using our environment capture script:
https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh
You can obtain the TensorFlow version with
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.
Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
The text was updated successfully, but these errors were encountered: