
深度学习Tensorflow-入门
与时光握手言和啊~
这个作者很懒,什么都没留下…
展开
-
第12章 对抗神经网络(GAN)
12.112.3 构建WGAN-GP生成MNIST数据集通过使用WGAN-GP网络学习MNIST数据特征,并生成以假乱真的MNIST模拟样本。程序:import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_dataimport osimport numpy as npfrom scipy...翻译 2019-08-27 19:55:45 · 627 阅读 · 0 评论 -
第10章 自编码网络——能够自学习样本特征的网络
10.1 自编码自编码网络,是一种以重构输入信号为目标的神经网络。包括输入层、隐藏层、输出层。代码:#1 引入头文件,并加载MNIST数据import tensorflow as tfimport numpy as npimport matplotlib.pyplot as plt# 导入 MINST 数据集from tensorflow.examples.tutorials...翻译 2019-08-27 17:22:45 · 361 阅读 · 0 评论 -
第8章 卷积神经网络
8.1 卷积函数的使用程序:import tensorflow as tf# shape = [batch,in_height,in_width,in_channels]# shape = [训练时一个批次的图片数量,图片高度,图片宽度,图像通道数]input = tf.Variable(tf.constant(1.0,shape = [1,5,5,1]))input2 = tf.V...翻译 2019-08-27 16:44:08 · 208 阅读 · 0 评论 -
第7章 多层神经网络
7.1 用线性单分逻辑回归分析肿瘤是良性还是恶性的程序:import numpy as npfrom sklearn.utils import shuffleimport matplotlib.pyplot as pltimport tensorflow as tfdef generate(sample_size,mean,cov,diff,regression): num...翻译 2019-08-27 10:35:04 · 343 阅读 · 0 评论 -
第6章 单个神经元
部分知识点笔记:正向传播、反向传播(BP算法)激活函数:Sigmoid函数、Tanh函数、ReLU函数、Swish函数Softmax算法——处理分类问题(伴随的分类标签都为one_hot编码)损失函数:描述模型预测值与真实值的差距大小(常用的算法:均值平方差和交叉熵),交叉熵 预测输入样本属于某一类的概率。交叉熵也是值越小,代表预测结果越准。损失函数的选取:如果输入的是实数、无界的值...翻译 2019-08-26 19:54:56 · 335 阅读 · 0 评论 -
第5章 MNIST数据集
本程序主要是初步使用MNIST数据集进行试验。程序:from tensorflow.examples.tutorials.mnist import input_datamnist = input_data.read_data_sets("MNIST_data/",one_hot=True)import tensorflow as tfimport pylabim = mnist.t...翻译 2019-08-26 19:36:45 · 271 阅读 · 0 评论 -
第4章 TensorFlow编程基础
4.1 使用Session编写hello world:程序:import tensorflow as tfhello = tf.constant('hello tensorflow')sess = tf.Session()print(sess.run(hello))sess.close()结果:b'hello tensorflow'4.2 with session的使用此段...翻译 2019-08-26 18:57:56 · 262 阅读 · 0 评论 -
第3章 TensorFlow基础之——以逻辑回归拟合二维数组
使用神经网络归纳出y = 2x的模型程序:import tensorflow as tfimport numpy as npimport matplotlib.pyplot as pltplotdata = {"batchsize":[],"lose":[]}def moving_average(a,w=10): if len(a) < w: retur...翻译 2019-08-26 16:10:03 · 449 阅读 · 0 评论