欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Jupyter notebook

程序员文章站 2022-03-03 13:51:24
...

 

 

  • 问题录

  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.