python tensorflow windows环境搭建体验
1. 需先安装python3.7,anaconda包管理器(类似java的maven),tensorflow,pycharm开发工具。文末附件下载地址。
2. 安装tensorflow,开始-Anaconda3-Anaconda3 Prompt。 打开控制台。


conda create -n tensorflow python=3.5.2
Anaconda首页

3. 常用包,Numpy:数学函数库、Scipy:NumPy开发的高级模块、
pandas:对数据进行导入、清洗、处理、统计和输出、
Scikit-learn:专门面向机器学习的Python开源框架
安装命令
conda install XXX
如:conda install scipy

4. 打开开发工具pycharm。
import numpy as np
import matplotlib.pyplot as plt #心形线
t = np.linspace(0, 2*np.pi, 100)
x = 16 * np.sin(t) ** 3
y = 13 * np.cos(t) - 5 * np.cos(2*t) - 2 * np.cos(3*t) - np.cos(4*t)
plt.plot(x, y, 'r-', linewidth=2)
plt.grid(True)
plt.show()
执行结果:

# 渐开线
t = np.linspace(0, 50, num=1000)
x = t*np.sin(t) + np.cos(t)
y = np.sin(t) - t*np.cos(t)
plt.plot(x, y, 'r-', linewidth=2)
plt.grid()
plt.show()

import tensorflow as tf x = tf.placeholder(tf.int16)
y = tf.placeholder(tf.int16)
z = tf.add(x, y, name='z') with tf.Session() as sess:
xs =[1, 2, 3]
ys = [2, 3, 4]
#print(sess.run(z, feed_dict={x: xs, y: ys}))
print(sess.run(z, feed_dict={x: xs, y: ys}))

# 胸型线
x = np.arange(1, 0, -0.001)
y = (-3 * x * np.log(x) + np.exp(-(40 * (x - 1 / np.e)) ** 4) / 25) / 2
plt.figure(figsize=(5,7), facecolor='w')
plt.plot(y, x, 'r-', linewidth=2)
plt.grid(True)
plt.title(u'胸型线', fontsize=20)
plt.savefig('breast.png')
plt.show()

代码下载
链接:https://pan.baidu.com/s/1dFnldBSaeJBBs_p_onUX3w
提取码:tk7p
python tensorflow windows环境搭建体验的更多相关文章
- Python 数据分析Windows环境搭建
1. 下载相应的Python软件并安装 python-3.6.0-amd64 2. 配置相应的环境变量path ;C:\Users\Administrator\AppData\Local\Progr ...
- 基于Ubuntu+Python+Tensorflow+Jupyter notebook搭建深度学习环境
基于Ubuntu+Python+Tensorflow+Jupyter notebook搭建深度学习环境 前言一.环境准备环境介绍软件下载VMware下安装UbuntuUbuntu下Anaconda的安 ...
- Python+Selenium+webdriver环境搭建(windows)以及相关资源下载链接
今天记录一下测试小菜鸟alter在测试入门的一点关于python+Selenium+webdriver环境搭建的经历以及资源分享.欢迎交流学习,批评指正. 一.Python的下载与安装 1.pytho ...
- 【selenium+python】之Python Flask 开发环境搭建(Windows)
一.先安装python以及pip 二.其次, Python的虚拟环境安装: 在github上下载https://github.com/pypa/virtualenv/tree/master zip文 ...
- Python介绍及环境搭建
摘自http://www.cnblogs.com/sanzangTst/p/7278337.html Python零基础学习系列之二--Python介绍及环境搭建 1-1.Python简介: Py ...
- python+Eclipse+pydev环境搭建
python+Eclipse+pydev环境搭建 本文重点介绍使用Eclipse+pydev插件来写Python代码, 以及在Mac上配置Eclipse+Pydev 和Windows配置Ecli ...
- Battery Historian for windows环境搭建
Battery Historian for windows环境搭建 简介:Battery historian是一款通过上传bugreport文件分析用户手机中App的电池耗电情况的工具. Batter ...
- 深度学习(TensorFlow)环境搭建:(三)Ubuntu16.04+CUDA8.0+cuDNN7+Anaconda4.4+Python3.6+TensorFlow1.3
紧接着上一篇的文章<深度学习(TensorFlow)环境搭建:(二)Ubuntu16.04+1080Ti显卡驱动>,这篇文章,主要讲解如何安装CUDA+CUDNN,不过前提是我们是已经把N ...
- 深度学习(TensorFlow)环境搭建:(二)Ubuntu16.04+1080Ti显卡驱动
前几天把刚拿到了2台GPU机器组装好了,也写了篇硬件配置清单的文章——<深度学习(TensorFlow)环境搭建:(一)硬件选购和主机组装>.这两台也在安装Ubuntu 16.04和108 ...
随机推荐
- 第五周总结&第三次实验报告
实验三 String类的应用 实验目的 掌握类String类的使用: 学会使用JDK帮助文档: 实验内容 1.已知字符串:"this is a test of java".按要求执 ...
- CentOS6 破解登录密码
1.重启服务器,在倒数读秒的时候按任意键,就会出现如下界面 2.按e进入grub模式,选中kernel,然后按e进入内核编辑模式 3.进入内核编辑模式后,按空格+1回车(或按空格+single回车)退 ...
- Python学习-第二天-字符串和常用数据结构
Python学习-第二天-字符串和常用数据结构 字符串的基本操作 def main(): str1 = 'hello, world!' # 通过len函数计算字符串的长度 print(len(str1 ...
- hdu6351 Beautiful Now (全排列+循环节)
题目传送门 题意: 给你n和k,你每次能交换n的两个位,问最多k次后的最小和最大值 思路: 考虑到n到1e9,所以可以用全排列来暴力,但是我们不能全排列之前的数位, 因为n中的位数可能相等,那样很难计 ...
- 攻防世界--ReverseMe-120
测试文件:https://adworld.xctf.org.cn/media/task/attachments/a5c0e8322d9645468befabddfe0cb51d.exe 1.准备 获取 ...
- jQuery学习总结05-事件
1.事件的发生 <!DOCTYPE html> <html lang="en"> <head> <meta charset="U ...
- NOIP2017 Day2 T1 奶酪(并查集)
题目描述 现有一块大奶酪,它的高度为 hhh ,它的长度和宽度我们可以认为是无限大的,奶酪 中间有许多 半径相同 的球形空洞.我们可以在这块奶酪中建立空间坐标系,在坐标系中, 奶酪的下表面为z=0z ...
- redis专题
1.Linux安装redis 2.redis持久化 3.redis配置 4.SpringBoot整合Redis发布订阅 5.redis事务 5.1.redis事务介绍 5.2. redisTempla ...
- centos 6.5 安装 maven
从nexus官网下载Nexus Repository Manager OSS 2.x的安装包:nexus-2.14.1-01-bundle.tar.gz,3.x版本需要jdk8及以上 解压 tar x ...
- 【leetcode】1054. Distant Barcodes
题目如下: In a warehouse, there is a row of barcodes, where the i-th barcode is barcodes[i]. Rearrange t ...