zoukankan      html  css  js  c++  java
  • Tensorflow 学习笔记(一)mac os 安装 tensorflow

    Homebrew 安装python

    brew install python

    安装pip

    curl ‘https://bootstrap.pypa.io/get-pip.py’ > get-pip.py
    python get-pip.py

    ps: 安装完之后注意在PATH中指定pip的路径

    安装tensorflow

    pip3 intall tensorflow

    安装中可能会出现timeout error,此时可以尝试:

    pip --default-timeout=1000 install -U tensorflow

    或者

    #python 2.7, cpu only
    下载https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0rc0-py2-none-any.whl文件 pip
    install xx.whl

    #python 3.6, cpu only
    下载https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0rc0-py3-none-any.whl文件
    pip install xx.whl

    安装keras

    pip3 install keras

    验证安装是否正确

    python
    
    import tensorflow as tf
    
    from keras.models import Sequential
    
    hello = tf.constant('Hello, TensorFlow!')
    
    sess = tf.Session()
    
    sess.run(hello)
    
    model = Sequential()

    自此,tensorflow安装完毕,后面会逐渐用tensorflow写一些实例

  • 相关阅读:
    第二次作业
    国庆节假期作业1
    memoize使用实例之创建XHR
    javascript 函数式编程(3)
    javascript 异步循环 asyncEach
    c++ 精简版 序列化
    javascript 函数式编程(4)
    javascript setZeroTimeout
    c++ 精简版 thread
    PHP Memoization
  • 原文地址:https://www.cnblogs.com/lightsun/p/9483261.html
Copyright © 2011-2022 走看看