上一页 1 ··· 147 148 149 150 151 152 153 154 155 ··· 178 下一页
  2019年8月27日
摘要: python assert的作用:assert函数用于程序调试Python 官方文档解释https://docs.python.org/3/reference/simple_stmts.html#assert “Assert statements are a convenient way to in 阅读全文
posted @ 2019-08-27 08:59 一杯明月 阅读(1913) 评论(0) 推荐(0)
  2019年8月26日
摘要: from keras.utils.np_utils import * # 类别向量定义 b = [0, 1, 2, 3, 4, 5, 6, 7, 8] # 调用to_categorical将b按照9个类别来进行转换 b = to_categorical(b, 9) print(b) 来源:https 阅读全文
posted @ 2019-08-26 23:10 一杯明月 阅读(5788) 评论(0) 推荐(0)
摘要: img = np.array(im) R,G,B=im.split() r=np.array(R) g=np.array(G) b=np.array(B) print(r[0]) print(g[0]) print(b[0]) print(im.getpixel((0,0))) 阅读全文
posted @ 2019-08-26 20:18 一杯明月 阅读(799) 评论(0) 推荐(0)
摘要: 1. 数组的操作: import numpy as np a = np.array([[1, 2], [3, 4]]) print(a) print(type(a)) print(np.mean(a)) print(np.mean(a, axis=0)) # axis=0,计算每一列的均值 prin 阅读全文
posted @ 2019-08-26 16:25 一杯明月 阅读(29824) 评论(0) 推荐(0)
摘要: import numpy as np from PIL import Image import pickle import os CHANNEL = 3 WIDTH = 32 HEIGHT = 32 data = [] labels=[] classification = ['airplane','automobile','bird','cat','deer','dog','frog... 阅读全文
posted @ 2019-08-26 13:34 一杯明月 阅读(1218) 评论(0) 推荐(0)
  2019年8月20日
摘要: 格式说明由%和格式字符组成,如%f,它的作用是将数据按照指定的格式输出。格式说明是由“%”字符开始的。 1.整型输出%d print 'my age is %d'% (26) 说明:%d相当于是一个占位符号,下同。 2.输出字符串%s print 'my name is %s' % ('xiaomi 阅读全文
posted @ 2019-08-20 19:37 一杯明月 阅读(2578) 评论(0) 推荐(0)
摘要: 1,GitHub 中可以直接打开 .ipynb 文件。 2,可以把 .ipynb 文件对应的下载链接复制到 https://nbviewer.jupyter.org/ 中查看。 阅读全文
posted @ 2019-08-20 13:56 一杯明月 阅读(3852) 评论(0) 推荐(0)
  2019年8月17日
摘要: 阅读全文
posted @ 2019-08-17 10:12 一杯明月 阅读(5071) 评论(0) 推荐(0)
  2019年8月6日
摘要: 作用:将 TensorFlow 日志信息输出到屏幕 阅读全文
posted @ 2019-08-06 14:30 一杯明月 阅读(3149) 评论(0) 推荐(0)
  2019年8月4日
摘要: h1=figure(9);set( h1, 'Color','k'); 阅读全文
posted @ 2019-08-04 15:59 一杯明月 阅读(783) 评论(0) 推荐(0)
上一页 1 ··· 147 148 149 150 151 152 153 154 155 ··· 178 下一页