tensorflow
MVincent
这个作者很懒,什么都没留下…
展开
-
TensorFlow(二)——第一个程序
import tensorflow as tf import numpy as np x_data = np.linspace(-1,1,300)[:, np.newaxis] #np.linspace 返回等差数列 #np.newaxis == None noise = np.random.normal(0, 0.05, x_data.shape) #加入噪点 y_data = np.squ...原创 2018-09-11 16:09:31 · 223 阅读 · 0 评论 -
TensorFlow(三)——MNIST分类
import input_data import tensorflow as tf mnist = input_data.read_data_sets('data/', one_hot=True) #定义回归模型 x = tf.placeholder(tf.float32, [None, 784]) w = tf.Variable(tf.zeros([784, 10])) b = tf.Va...原创 2018-09-11 21:51:04 · 298 阅读 · 0 评论 -
TensorFlow(四)——MNIST分类之CNN
import input_data import tensorflow as tf import numpy as np mnist = input_data.read_data_sets('data/', one_hot=True) trX, trY, teX, teY = mnist.train.images, mnist.train.labels, mnist.test.images,...原创 2018-09-12 14:21:00 · 282 阅读 · 0 评论 -
TensorFlow(五)——MNIST分类值RNN
import input_data import tensorflow as tf import numpy as np mnist = input_data.read_data_sets('data/', one_hot=True) #设置训练超参数 lr = 0.001 training_iters = 100000 batch_size = 128 #设置神经网络参数 n_input...原创 2018-09-12 22:20:32 · 262 阅读 · 0 评论 -
TensorFlow(六)——MNIST分类之自动编码器
import input_data import tensorflow as tf import numpy as np import matplotlib.pyplot as plt mnist = input_data.read_data_sets('data/', one_hot=True) #设置训练超参 learning_rate = 0.01 training_epochs = ...原创 2018-09-13 10:34:08 · 836 阅读 · 0 评论