zoukankan      html  css  js  c++  java
  • tensorflow入门——5tensorflow安装

    你将把你学到的神经网络的知识,借助 TensorFlow ,一个 Google 开源的深度学习框架,应用在真实的数据集中。

    你将使用 TensorFlow 来辨别 notMNIST 数据集。它是一个由 A 到 J 的英文字母图片组成的数据集,下面是一些示例。

     
     

    你的目标是根据数据集中的图片,自动识别字母。在自己电脑上就可以完成这个项目。不过首先,你要安装 TensorFlow!

     

    安装

    跟往常一样,我们用 Conda 来安装 TensorFlow。你也许已经有了一个 TensorFlow 环境,但要确保你安装了所有必要的包。

    OS X 或 Linux

    运行下列命令来配置开发环境

    conda create -n tensorflow python=3.5
    source activate tensorflow
    conda install pandas matplotlib jupyter notebook scipy scikit-learn
    conda install -c conda-forge tensorflow

    Windows

    Windows系统,在你的 console 或者 Anaconda shell 界面,运行

    conda create -n tensorflow python=3.5
    activate tensorflow
    conda install pandas matplotlib jupyter notebook scipy scikit-learn
    conda install -c conda-forge tensorflow

    Hello, world!

    在 Python console 下运行下列代码,检测 TensorFlow 是否正确安装。如果安装正确,Console 会打印出 "Hello, world!"。现在还不需要理解这段代码做了什么,你会在下一节学到。

    import tensorflow as tf
    
    # Create TensorFlow object called tensor
    hello_constant = tf.constant('Hello World!')
    
    with tf.Session() as sess:
        # Run the tf.constant operation in the session
        output = sess.run(hello_constant)
        print(output)
  • 相关阅读:
    visitortheoryreflection.cs
    adaptertheory.cs
    factorymethodavocados.cs
    compositetheorynswithShare.cs
    在.NET/Mono上运行Java:Jeroens Frijters谈IKVM.NET
    Building ASP.NET Server ControlsTextbox.cs
    compositephotolibrary.cs
    proxyspacebook.cs
    adapterpluggabletheory.cs
    Building ASP.NET Server ControlsFancyLabel.cs
  • 原文地址:https://www.cnblogs.com/fuhang/p/8931068.html
Copyright © 2011-2022 走看看