2018年9月7日
摘要: 基本画图操作:import matplotlib.pyplot as pltimport numpy as npx = np.linspace(-3,3,50)y1 = 2*x+1y2 = x**2#x... 阅读全文
posted @ 2018-09-07 21:38 蔡军帅 阅读(288) 评论(0) 推荐(0)
摘要: 基本画图操作: 设置图例: 设置坐标轴位置: 标注: (1)annotate语法说明 :annotate(s='str' ,xy=(x,y) ,xytext=(l1,l2) ,..) s 为注释文本内容 xy 为被注释的坐标点xytext 为注释文字的坐标位置xycoords 参数如下: figur 阅读全文
posted @ 2018-09-07 21:38 蔡军帅 阅读(2691) 评论(0) 推荐(0)
摘要: 从mnist下载手写数字图片数据集,图片为28*28,将每个像素的颜色(0到255)改为(0倒1),将标签y变为10个长度,若为1,则在1处为1,剩下的都标为0。 接下来搭建CNN 卷积->池化->卷积->池化 使图片从(1,28,28)->(32,28,28)->(32,14,14)-> (64, 阅读全文
posted @ 2018-09-07 11:40 蔡军帅 阅读(3421) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*-import numpy as npnp.random.seed(1337) #for reproducibility再现性from keras.datasets i... 阅读全文
posted @ 2018-09-07 11:40 蔡军帅 阅读(223) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*-import numpy as npnp.random.seed(1337) #for reproducibility再现性from keras.datasets i... 阅读全文
posted @ 2018-09-07 10:28 蔡军帅 阅读(129) 评论(0) 推荐(0)
摘要: 从mnist下载手写数字图片数据集,图片为28*28,将每个像素的颜色(0到255)改为(0倒1),将标签y变为10个长度,若为1,则在1处为1,剩下的都标为0。 搭建神经网络,Activation为激活函数。由于第一个Dense传出32.所以第二个的Dense默认传进32,不用特意设置。 训练和测 阅读全文
posted @ 2018-09-07 10:28 蔡军帅 阅读(1762) 评论(0) 推荐(0)