摘要: Sorting Lists sorted(iterable,key=None,reverse=False),does not mutate list, must assign result to a variable(返回新的列表,对所有可迭代的对象均有效) sort(key=None,revers 阅读全文
posted @ 2017-12-04 16:38 爱学英语的程序媛 阅读(176) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data #载入数据集 mnist = input_data.read_data_sets("/data/stu05/mnist_data",o 阅读全文
posted @ 2017-12-03 22:15 爱学英语的程序媛 阅读(573) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt #使用numpy生成200个随机点,范围从-0.5到0.5均匀分布,增加一个维度得到200行1列的数据(生成二维数据)x_data = np.linspa 阅读全文
posted @ 2017-12-03 22:12 爱学英语的程序媛 阅读(1098) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt #使用numpy生成200个随机点,范围从-0.5到0.5均匀分布,增加一个维度得到200行1列的数据(生成二维数据)x_data = np.linspa 阅读全文
posted @ 2017-12-03 21:11 爱学英语的程序媛 阅读(1594) 评论(0) 推荐(0) 编辑
摘要: placeholder: 要给节点输入数据时用 placeholder,在 TensorFlow 中用placeholder 来描述等待输入的节点,只需要指定类型即可,然后在执行节点的时候用一个字典来“喂”这些节点。相当于先把变量 hold 住,然后每次从外部传入data,注意 placeholde 阅读全文
posted @ 2017-12-03 21:02 爱学英语的程序媛 阅读(262) 评论(0) 推荐(0) 编辑
摘要: MNIST数据集,每张图片包含28*28个像素,把一个数组展开成向量,长度为28*28=784,故数据集中mnist.train.images是一个形状为[60000,784]的张量,第一个维度数字用来索引图片,第二个维度数字用来索引每张图片的像素点,像素的强度介于0-1。 MNIST数据集的标签是 阅读全文
posted @ 2017-12-03 19:21 爱学英语的程序媛 阅读(302) 评论(0) 推荐(0) 编辑
摘要: Exercise: odd tuples 5/5 points (graded) ESTIMATED TIME TO COMPLETE: 5 minutes Write a procedure called oddTuples, which takes a tuple as input, and r 阅读全文
posted @ 2017-12-02 22:27 爱学英语的程序媛 阅读(404) 评论(0) 推荐(0) 编辑
摘要: ESTIMATED TIME TO COMPLETE: 18 minutes We can use the idea of bisection search to determine if a character is in a string, so long as the string is so 阅读全文
posted @ 2017-12-01 21:11 爱学英语的程序媛 阅读(982) 评论(0) 推荐(0) 编辑
摘要: Assume s is a string of lower case characters. Write a program that prints the longest substring of s in which the letters occur in alphabetical order 阅读全文
posted @ 2017-11-24 21:54 爱学英语的程序媛 阅读(609) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-11-17 22:08 爱学英语的程序媛 阅读(130) 评论(0) 推荐(0) 编辑