Jupyter notebook中的問題

 

 

  • 問題錄

  1.  (Ubuntu18.04)在運行程序時,在啓動jupyter的Terminal中,出現  “Your CPU supports instructions that this TensorFlow binary was not compiled to use : AVX2 FMA
    1. 解決方案:    在程序中添加兩行代碼
      import os
      os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'    # 忽略哪些報告

       

    2.  
  2. Ubuntu18.04)在運行程序時,在啓動jupyter的Terminal中,出現如下報錯:
    Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
    Successfully opened dynamic library libcuda.so.1
    unable to create StreamExecutor for CUDA:0: failed initializing StreamExecutor for CUDA device ordinal 0: Internal: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 8366784512
    Attempting to fetch value instead of handling error Internal: no supported devices found for platform CUDA
    KernelRestarter: restarting kernel (1/5), keep random ports
    WARNING:root:kernel 6dbbeb38-7b12-473a-89c0-51d5a0398abe restarted
    
    Kernel Restarting
    The kernel appears to have died. It will restart automatically.
     
    1.  原因分析:顯卡內存不足,因爲在使用TensorFlow做人工神經網絡運算時,會默認佔用GPU所有的顯存,這樣以防止被其他程序佔用。
    2.  問題解決:
      1. 重啓 jupyter note book,清除已佔用的GPU內存。
      2. 或者:在程序中加入(待驗證)
        import os
        os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'

         

  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章