Getting started with TensorFlow

Getting started with TensorFlow

本篇文章主要是记录如何从零开始接触TensorFlow:

  • 由于个人比较喜欢用Python, 所以本文中介绍的是Python 版本
  • 由于没有Linux 电脑, clone 一个也比较麻烦, 所以直接安装Windows 版本
  • TensorFlow 的新手入门学习

Python 安装

-参考的文档是:博客地址
- TensorFlow 的对应 Python版本必须是 Python3.5 版本及以上, (Python2.X 和Python3.X 是不兼容的, 所以必须看好Python的安装版本)
- Python 3.5.4安装:
安装地址
- 设置python的环境变量:
1. Control Panel\System and Security\System\ , 点击 Advanced system settings , 进入 Environment Variables, 设置PATH
2. 字符串后面添加 Python35 路径以及Python35的Scripts 路径(别忘记分号)

;C:\Users\ref3oz\AppData\Local\Programs\Python\Python35\;C:\Users\ref3oz\AppData\Local\Programs\Python\Python35\Scripts;
  1. note:需要把script里面的pip文件copy到python35这个目录;

TensorFlow 安装

最简单的安装方式就是通过pip 安装, 只要一条command line :

pip3 install –upgrade tensorflow


pip 之后出现Syntax error 的解决方案

具体步骤:

  1. TensorFlow 安装官方教程: https://www.tensorflow.org/install/install_windows
  2. start 一个command prompt, cd 到Python35 路径下, in my case :
    C:\Users\ref3oz\AppData\Local\Programs\Python\Python35
  3. run command line:

    pip3 install –upgrade tensorflow

  4. 安装好之后command显示如下:
    command prompt after installed

  5. 安装好之后测试: (直接 启用Python的command Shell,再进行测试)

    python

import tensorflow as tf
hello = tf.constant(‘Hello, TensorFlow!’)
sess = tf.Session()
print(sess.run(hello))

为防止有些童鞋不晓得,特意截屏:
Python Shell

TensorFlow 入门

如果是首次接触TensorFlow, 可以看看官方网站上面有关TensorFlow的介绍:
https://www.tensorflow.org/get_started/get_started

在本地将这些命令跑一遍就能大致简单理解各个command的作用.

尾注

  1. 今天是开始学习的第一天, 由于本人也是为在职旁枝coding人员, 对于图像处理感兴趣,所以利用业余时间充实一下自己,有何意见与建议,欢迎批评指正.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值