• TensorFlow.环境_avx2(含GPU查的资料)


    1、缘由:

      按照之前的步骤,在Win10的笔记本上就是不行:

     1.1、jupyter notebook的相关界面,如下图所示:

      

      ZC:感觉 应该还是 tensorflow的问题

     1.2、然后 各种测试:

      

      ZC:这里 发现 随机数 出来的Sum结果是 0,感觉不太对("Python3 -c ....."这条命令 一点反应也没有,也感觉怪怪的...)。但是 看版本 又觉得还行,应该是正常的...

    // ZC: 下面这句代码 执行后没反应...why?
    python3 -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
    
    // ZC: 下面这句代码 执行后返回0,why?我装了"tensorflow-1.14.0-cp37-cp37m-win_amd64.whl"后执行这里 一样是0,why?得看看Py的语法了..
    python -c "import tensorflow as tf; print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
    
    python -c "import tensorflow as tf; print(tf.__version__)"

      于是 又换一种方式:

    $ python
    >>> import tensorflow as tf
    >>> hello = tf.constant('Hello, TensorFlow!')
    >>> sess = tf.Session()
    >>> print(sess.run(hello))
    Hello, TensorFlow!
    >>> a = tf.constant(10)
    >>> b = tf.constant(22)
    >>> print(sess.run(a + b))
    32
    >>>

      我是 一句一句将代码复制到Python控制台 然后回车的,在执行到 “sess = tf.Session()”时 报错了:

      于是 度娘“Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2”

       于是找到了:(有很多的 搜索结果的,只是挑了这个先尝试的)

        Your CPU supports instructions that this TensorFlow binary was not compiled to use_ AVX2 FMA - 山中有石为玉 - CSDN博客.html(https://blog.csdn.net/weixin_41770169/article/details/86003010

        解决Tensorflow 使用时cpu编译不支持警告 - Fourierrr_的博客 - CSDN博客.html(https://blog.csdn.net/Fourierrr_/article/details/79749899

          pip uninstall tensorflow
          完成后可以用pip list查看一下所有库,检查是否成功卸载
          pip install tensorflow-1.6.0-cp36-cp36m-win_amd64.whl

        ZC:在github中 看到一个 这个路径:“https://github.com/fo40225/tensorflow-windows-wheel/tree/master/1.14.0/cpp” 这里面是专门为 WIndows下的C++准备的?怎么用?以后搜搜... (可以查看到 CPU、GPU、CUDA的版本对应)

    2、

    3、度娘 搜“libtensorflow-cpu-windows-x86_64-1.14.0.sse2.7z”时 搜到的:

      windows下编译tensorflow源码 用其c++接口调用训练好的模型 - 世事一场大梦 - CSDN博客.html(https://blog.csdn.net/yuejisuo1948/article/details/84197534

    4、

    5、(20190906)可能要安装 tensorflow-gpu版本

     5.1、度搜:“pip  install tensorflow-gpu”

      windows10安装tensorflow的gpu版本(pip3安装方式) - 华行天下 - 博客园.html(https://www.cnblogs.com/huaxingtianxia/p/8048018.html

      tensorflow 安装GPU版本,个人总结,步骤比较详细 - gangeqian2的博客 - CSDN博客.html(https://blog.csdn.net/gangeqian2/article/details/79358543

     ZC:按照之前 家里笔记本sse2版本改avx2版本的经验,貌似只要改tensorflow就可以 若tensorflow版本号没变的话 其它不用动,不知 改GPU版本 会不会也这么顺利

    6、CUDA Toolkit Archive _ NVIDIA Developer.html(https://developer.nvidia.com/cuda-toolkit-archive

      cuDNN Archive _ NVIDIA Developer.html(https://developer.nvidia.com/rdp/cudnn-archive)  ZC:下载需要登陆账号,注册了一个 账号:okmnji79513@163.com

    7、

    8、

    9、

  • 相关阅读:
    程序书写规范
    点灯主要顺序
    复用功能重映射
    STM32 (战舰)
    html5 javascript 新增加的高级选择器更精准更实用
    html5 javascript 事件练习3键盘控制练习
    html5 javascript 事件练习3随机键盘
    html5 javascript 事件练习2
    html5 javascript 事件练习1
    html5dom2
  • 原文地址:https://www.cnblogs.com/cppskill/p/11228863.html
Copyright © 2020-2023  润新知