Why can’t you stop buying 618?From the technical dimension to explore>>>
The GPU version of tensorflow encountered blas GEMM launch failed error during model training, or keras encountered the same error (keras generally takes tensorflow as the backend, if the GPU version of tensorflow is installed, GPU will be preferred when using keras)
InternalError (see above for traceback): Blas GEMM launch failed : a.shape=(300, 1), b.shape=(1, 10), m=300, n=10, k=1
This is when calling GPU, the video memory allocation encountered a problem. The way to compare security is to allocate memory space for tensorflow or keras before model training. Tensorflow creates a session with the following statement
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
The parameters of keras are set when keras is introduced
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
config = tf.ConfigProto()
config.gpu_options.allocator_type = 'BFC' #A "Best-fit with coalescing" algorithm, simplified from a version of dlmalloc.
config.gpu_options.per_process_gpu_memory_fraction = 0.3
config.gpu_options.allow_growth = True
set_session(tf.Session(config=config))
If you use IPython notebook, GPU sync failed may appear after completing the above settings, and it should be OK to restart it
From: https://blog.csdn.net/Leo_ Xu06/article/details/82023330
I tried the useful of tensorflow, record it
Similar Posts:
- [Solved] Failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
- [Solved] TensorFlow Error: InternalError: Failed copying input tensor
- Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
- “Failed to get convolution algorithm. This is probably because cuDNN failed to initialize”
- Paddlepaddle uses multi process error reporting “(External) CUDA error (3), initialization error.” solution.
- AttributeError: module ‘tensorflow’ has no attribute ‘Session’
- [Solved] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
- The solution of CUDA error: out of memory in yolo3 training
- Conda Install Library Error: failed with initial frozen solve. Retrying with flexible solve.
- [Solved] Tensorflow Error: ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray)