已解决W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
import tensorflow.contrib.layers as layers
ModuleNotFoundError: No module named ‘tensorflow.contrib’
Article directory
Error code
A friend in the fan group wanted to import the tensorflow module, but an error occurred (at that time, he felt a lot cold, and came to me for help, and then successfully helped him solve the problem. By the way, I recorded it in the hope that it can help more people who encounter this problem. Friends who can’t solve the bug), the error code is as follows:
import tensorflow.contrib.layers as layers
The error message is as follows :
Error translation
The error message is translated as follows :
W tensorflow/stream_executor/platform/default/ddso_loader.cc:64] Unable to load dynamic library 'cuart64_110.dll'; dlerror: cudart64_110.dll not found
I tensorflow/stream_executor/cuda/cudart_stub.cc:29] If your computer There is no GPU set up on , please ignore the cudart error above.
Import tensorflow.contrib.layers as layers.
Module not found error: There is no module named "tensorflow.contrib"
Reason for error
Reason for error :
The contrib method in TensorFlow module 2.0 is deprecated, so the corresponding module cannot be found.Friends, just choose one of the methods below! ! !
Solution
Solution 1: Install a lower version of tensorflow
pip install tensorflow==1.14.0
Solution 2: No downgrade solution
Execute the following pip command:
pip install --upgrade tf_slim
Change it import tensorflow.contrib.slim as slim
to the following:
import tf_slim as slim
The above is the solution to the cause of this problem. You are welcome to leave a message in the comment area to discuss whether it can be solved.If it is useful, please like and save the article. Thank you for your support. Only then will the blogger be motivated to continue recording the problems encountered.!!!
Thousands of people in the full-stack VIP Q&A group contact bloggers to help solve errors
Since bloggers have limited time and energy, and there are too many private messages every day, it is impossible to reply to every fan in time, so priority is given to replying to VIP fans. You can enter the full stack of thousands of people by subscribing to the limited-time 9.9 paid column "Master Python in 100 Days from Entry to Employment" VIP Q&A group, get priority answering opportunities (code guidance, remote service), free 80G learning material gift pack, column subscription address: https://blog.csdn.net/yuan2019035055/category_11466020.html
-
Advantages :The author gives priority to answer opportunities (code guidance, remote services), and there are many big guys in the group who can stay together for warmth (opportunities for internal promotion in large factories). This column is a complete set of teaching specially prepared for students with zero foundation and those who need advanced improvement. , continue to advance from 0 to 100, and there will be practical projects in the follow-up, so you can easily cope with interviews!
-
Column benefits :Resume guidance, internal recruitment recommendations, weekly physical books, 80G full-stack learning videos, 300 IT e-books: Python, Java, front-end, big data, database, algorithm, crawler, data analysis, machine learning, interview question bank, etc.
-
Note : If you want to get a timely reply, subscribe to the column and send a private message to the blogger to join the VIP Q&A group with thousands of people.