zoukankan      html  css  js  c++  java
  • InternalError (see above for traceback): Blas GEMM launch failed

    训练BiLSTM模型的时候报错:

    InternalError (see above for traceback): Blas GEMM launch failed : a.shape=(32, 200), b.shape=(200, 400), m=32, n=400, k=200
    [[node bilstm_crf/bidirectional_rnn/fw/fw/while/lstm_cell/MatMul (defined at train-nxf.py:48) ]]
    [[node bilstm_crf/rnn_2/while/Switch_2 (defined at train-nxf.py:69) ]]
    

      

    解决方法:

      如果你是使用 GPU 版 TensorFlow 的话,并且你想在显卡高占用率的情况下训练模型,那你要注意在初始化 Session 的时候为其分配固定数量的显存,否则可能会在开始训练的时候直接报错退出: 
    这时你需要用下面的方法创建 Session: 

    gpu_options=tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
    sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options)) 
    

      

    参考文献:

    【1】https://blog.csdn.net/orangefly0214/article/details/80978374

  • 相关阅读:
    1048 石子归并
    高精度算法小结
    3117 高精度练习之乘法
    UVa 11809
    3115 高精度练习之减法
    3116 高精度练习之加法
    “da shen” in my heart
    爱是怀疑!
    普通disco
    崇拜
  • 原文地址:https://www.cnblogs.com/nxf-rabbit75/p/10653950.html
Copyright © 2011-2022 走看看