美文网首页我爱编程
TensorFlow--系列1入门

TensorFlow--系列1入门

作者: 慢牛策略 | 来源:发表于2018-05-15 17:41 被阅读20次

    1 Mac系统安装及测试--Installing with Virtualenv

    1  安装步骤:
    安装pip
    pip安装Virtualenv
    安装python(选择版本),创建Virtualenv运行环境
    激活Virtualenv环境,安装TensorFlow
    
    启动和关闭:
    $ cd targetDirectory
    $ source ./bin/activate      # If using bash, sh, ksh, or zsh
    $ source ./bin/activate.csh  # If using csh or tcsh 
    
     (targetDirectory)$ deactivate 
    

    2 TensorFlow使用入门

    2.1 The programming stack
    tensorflow_programming_environment.png
    demo测试:
    git clone https://github.com/tensorflow/models
    cd models/samples/core/get_started/
    python premade_estimator.py
    
    如果未报错,说明安装成功。
    
    2.2To write a TensorFlow program based on pre-made Estimators, you must perform the following tasks:
    -1 Create one or more input functions.
    -2 Define the model's feature columns.
    -3 Instantiate an Estimator, specifying the feature columns and various hyperparameters.
    -4 Call one or more methods on the Estimator object, passing the     appropriate input function as the source of the data.
    

    TensorFlow运行MINST例子:

    相关文章

      网友评论

        本文标题:TensorFlow--系列1入门

        本文链接:https://www.haomeiwen.com/subject/cmcgxftx.html