摘要:
Sorting Lists sorted(iterable,key=None,reverse=False),does not mutate list, must assign result to a variable(返回新的列表,对所有可迭代的对象均有效) sort(key=None,revers 阅读全文
摘要:
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data #载入数据集 mnist = input_data.read_data_sets("/data/stu05/mnist_data",o 阅读全文
摘要:
import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt #使用numpy生成200个随机点,范围从-0.5到0.5均匀分布,增加一个维度得到200行1列的数据(生成二维数据)x_data = np.linspa 阅读全文
摘要:
import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt #使用numpy生成200个随机点,范围从-0.5到0.5均匀分布,增加一个维度得到200行1列的数据(生成二维数据)x_data = np.linspa 阅读全文
摘要:
placeholder: 要给节点输入数据时用 placeholder,在 TensorFlow 中用placeholder 来描述等待输入的节点,只需要指定类型即可,然后在执行节点的时候用一个字典来“喂”这些节点。相当于先把变量 hold 住,然后每次从外部传入data,注意 placeholde 阅读全文
摘要:
MNIST数据集,每张图片包含28*28个像素,把一个数组展开成向量,长度为28*28=784,故数据集中mnist.train.images是一个形状为[60000,784]的张量,第一个维度数字用来索引图片,第二个维度数字用来索引每张图片的像素点,像素的强度介于0-1。 MNIST数据集的标签是 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文