随笔 - 1759  文章 - 0  评论 - 109  阅读 - 430万
08 2019 档案
super()函数
摘要:1.简单的使用 在类的继承中,如果重定义某个方法,该方法会覆盖父类的同名方法,但有时,我们希望能同时实现父类的功能,这时,我们就需要调用父类的方法了,可通过使用 super 来实现,比如: 在上面,Animal 是父类,Dog 是子类,我们在 Dog 类重定义了 greet 方法,为了能同时实现父类 阅读全文
posted @ 2019-08-30 22:15 一杯明月 阅读(554) 评论(0) 推荐(0) 编辑
图像语义分割
摘要:参考:https://blog.csdn.net/helloworld_fly/article/details/80306117 阅读全文
posted @ 2019-08-30 10:17 一杯明月 阅读(191) 评论(0) 推荐(0) 编辑
安装cuda及之后更新环境变量的方法
摘要:安装参考:https://www.cnblogs.com/fanfzj/p/8521728.html 更新环境变量: 将 CUDA、CUPTI 和 cuDNN 安装目录添加到 %PATH% 环境变量中。例如,如果 CUDA 工具包安装到了 C:\Program Files\NVIDIA GPU Co 阅读全文
posted @ 2019-08-29 11:17 一杯明月 阅读(13676) 评论(0) 推荐(0) 编辑
深度学习的超参数调整
摘要:在深度神经网络中,超参数的调整是一项必备技能,通过观察在训练过程中的监测指标如损失loss和准确率来判断当前模型处于什么样的训练状态,及时调整超参数以更科学地训练模型能够提高资源利用率。在本研究中使用了以下超参数,下面将分别介绍并总结了不同超参数的调整规则。 (1)学习率 学习率是一个超参数,控制我 阅读全文
posted @ 2019-08-28 23:05 一杯明月 阅读(4137) 评论(0) 推荐(0) 编辑
reshape()函数
摘要:""" 1.当原始数组A[4,6]为二维数组,代表4行6列。 A.reshape(-1,8):表示将数组转换成8列的数组,具体多少行我们不知道,所以参数设为-1。用我们的数学可以计算出是3行8列 2当原始数组A[4,6]为二维数组,代表4行6列。 A.reshape(3,-1):表示将数组转换成3行 阅读全文
posted @ 2019-08-28 09:26 一杯明月 阅读(18428) 评论(0) 推荐(0) 编辑
Python 3的 bytes 数据类型
摘要:来源:http://c.biancheng.net/view/2175.html 阅读全文
posted @ 2019-08-28 09:00 一杯明月 阅读(1911) 评论(0) 推荐(0) 编辑
python中的assert
摘要: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 一杯明月 阅读(1897) 评论(0) 推荐(0) 编辑
keras中to_categorical()函数解析
摘要: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 一杯明月 阅读(5774) 评论(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 一杯明月 阅读(781) 评论(0) 推荐(0) 编辑
np.mean()函数
摘要: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 一杯明月 阅读(29659) 评论(0) 推荐(0) 编辑
cifar-10数据集的可视化
摘要: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 一杯明月 阅读(1195) 评论(0) 推荐(0) 编辑
python 格式化输出%s %f %d
摘要:格式说明由%和格式字符组成,如%f,它的作用是将数据按照指定的格式输出。格式说明是由“%”字符开始的。 1.整型输出%d print 'my age is %d'% (26) 说明:%d相当于是一个占位符号,下同。 2.输出字符串%s print 'my name is %s' % ('xiaomi 阅读全文
posted @ 2019-08-20 19:37 一杯明月 阅读(2510) 评论(0) 推荐(0) 编辑
如何打开.ipynb文件
摘要:1,GitHub 中可以直接打开 .ipynb 文件。 2,可以把 .ipynb 文件对应的下载链接复制到 https://nbviewer.jupyter.org/ 中查看。 阅读全文
posted @ 2019-08-20 13:56 一杯明月 阅读(3796) 评论(0) 推荐(0) 编辑
python无法导入自己的模块的解决办法
摘要: 阅读全文
posted @ 2019-08-17 10:12 一杯明月 阅读(5065) 评论(0) 推荐(0) 编辑
tf.logging.set_verbosity
摘要:作用:将 TensorFlow 日志信息输出到屏幕 阅读全文
posted @ 2019-08-06 14:30 一杯明月 阅读(3138) 评论(0) 推荐(0) 编辑
matlab改变fig的背景颜色
摘要:h1=figure(9);set( h1, 'Color','k'); 阅读全文
posted @ 2019-08-04 15:59 一杯明月 阅读(767) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示