environment
Environment: docker
System: Ubuntu 18.04
graphics card: RTX 1080ti
tf-v: 1.15.0
Run the neural network model and report the error of the title
The screenshot of the error is as follows:
solution:
Add the following code after the import of the entry file:
config = tf.compat.v1.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.6 # 0.6 sometimes works better for folks
keras.backend.tensorflow_backend.set_session(tf.compat.v1.Session(config=config))
Limit the running memory of Tensorflow
Read More:
- [Solved] R Error: Python module tensorflow.keras was not found.
- [Solved] TensorFlow Error: UnknownError (see above for traceback): Failed to get convolution algorithm.
- Python AttributeError: module ‘tensorflow‘ has no attribute ‘InteractiveSession‘
- [How to Fix]RuntimeError: Python is not installed as a framework, If you are using (Ana)Conda
- ModuleNotFoundError: No module named ‘tensorflow.python’ And the pits encountered after installation
- [Solved] NPM install Error: check python checking for Python executable python2 in the PATH
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- How to Solve Python Importerror: DLL load failed: unable to find the specified program using tensorflow
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- Python uses try… Except… To output detailed errors
- [Solved] opencv-python: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all‘ failed
- How to Fix Errors encountered in executing Python scripts with command line parameters
- [Solved] Python Requests Error: simplejson.errors.JSONDecodeError: Expecting value
- [Solved] ParserError: NULL byte detected. This byte cannot be processed in Python‘s native csv library
- MAC OS install python3 Error: Permission denied @ dir_s_mkdir-/usr/local/Frameworks
- Python: How to Find the square root and square of numbers (Several methods)
- Python errors: valueerror: if using all scalar values, you must pass an index (four solutions)
- [Mac Pro M1] Python3.9 import cv2 Error: Reason: image not found
- Linux installs Python and upgrades Python
- Python opens the table and appears pandas.errors.ParserError: Error tokenizing data. C error: