Getting started with TensorFlow

阅读: 评论:0

Getting started with TensorFlow

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 PanelSystem and SecuritySystem , 点击 Advanced system settings , 进入 Environment Variables, 设置PATH
2. 字符串后面添加 Python35 路径以及Python35的Scripts 路径(别忘记分号)

;C:Usersref3ozAppDataLocalProgramsPythonPython35;C:Usersref3ozAppDataLocalProgramsPythonPython35Scripts;
  1. note:需要把script里面的pip文件copy到python35这个目录;

TensorFlow 安装

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

pip3 install –upgrade tensorflow


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

具体步骤:

  1. TensorFlow 安装官方教程:
  2. start 一个command prompt, cd 到Python35 路径下, in my case :
    C:Usersref3ozAppDataLocalProgramsPythonPython35
  3. run command line:

    pip3 install –upgrade tensorflow

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

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

    python

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

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

TensorFlow 入门

如果是首次接触TensorFlow, 可以看看官方网站上面有关TensorFlow的介绍:

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

尾注

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

本文发布于:2024-02-01 16:08:13,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170677489237829.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:started   TensorFlow
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23