爽歪歪666
不以物喜,不以己悲,努力才是永恒的主题。
12 2019 档案
调整学习率-torch.optim.lr_scheduler.MultiStepLR()方法
摘要:optimizerG = optim.Adam(netG.parameters(), lr=opt.lr_g, betas=(opt.beta1, 0.999)) torch.optim.lr_scheduler.MultiStepLR(optimizer=optimizerG,milestones 阅读全文
posted @ 2019-12-31 21:21 爽歪歪666 阅读(10518) 评论(0) 推荐(1)
python-GridSearchCV中的评估标准-neg_log_loss,log-loss
摘要:http://www.voidcn.com/article/p-qrqsxppp-bum.html 阅读全文
posted @ 2019-12-26 21:47 爽歪歪666 阅读(1377) 评论(0) 推荐(0)
Python-数据标准化-transform和fit_transform的区别
摘要:在训练集和测试集数据预处理时,需要对数据进行标准化 训练集使用fit_transform 测试集使用transform 例如: StandardScaler类是一个用来讲数据进行归一化和标准化的类 1 from sklearn.preprocessing import StandardScaler 阅读全文
posted @ 2019-12-26 16:55 爽歪歪666 阅读(2360) 评论(0) 推荐(0)
最小二乘法-矩阵求导
摘要:https://www.cnblogs.com/qianxiayi/p/9025400.html 阅读全文
posted @ 2019-12-25 15:41 爽歪歪666 阅读(147) 评论(0) 推荐(0)
Pycharm-使用技巧
摘要:安装Python 第三方库,下载地址: https://www.lfd.uci.edu/~gohlke/pythonlibs/ pycharm 使用技巧(command+J,在Windows下,command相当于control键) https://blog.csdn.net/Tong_T/arti 阅读全文
posted @ 2019-12-24 17:39 爽歪歪666 阅读(202) 评论(0) 推荐(0)
numpy-np.ceil,np.floor,np.expand_dims方法
摘要:np.ceil(多维数组):对多维数组的各个数向上取整 np.floor(多维数组):对多维数组的各个数向下取整 np.expand_dims(x,axis = 0):在x的第一维度上插入一个维度,axis=1,在x的第二个维度上插入一个维度 例如: x = np.array([[1,2,3],[4 阅读全文
posted @ 2019-12-18 16:14 爽歪歪666 阅读(810) 评论(0) 推荐(0)
python中的lambda表达式
摘要:lambda用来编写简单的函数 lamda表达式一般格式: 接收返回的值 = lambda 参数(一个或者多个):表达式 阅读全文
posted @ 2019-12-18 10:55 爽歪歪666 阅读(256) 评论(0) 推荐(0)
图像读取的一般方法
摘要:1. PIL:读取的是图像格式 1) image = Image.open(r'./Input/Images/33039_LR.png') print(image) 输出结果: <PIL.PngImagePlugin.PngImageFile image mode=RGB size=80x120 a 阅读全文
posted @ 2019-12-18 10:43 爽歪歪666 阅读(536) 评论(0) 推荐(0)
Python extend函数解读
摘要:1 num = [1,2] 2 print('将1迭代2次') 3 num.extend([1]*2) 4 print(num) 5 print('将2迭代3次') 6 num.extend([2] * 3) 7 print(num) 8 num1 = [4,5] 9 num.extend(num1 阅读全文
posted @ 2019-12-17 10:53 爽歪歪666 阅读(5862) 评论(0) 推荐(0)
pytorch-argparse的用法
摘要:import argparse def parse(): parser = argparse.ArgumentParser() parser.add_argument('--scales',help='scales',type=int,default=5) opt = parser.parse_ar 阅读全文
posted @ 2019-12-17 09:52 爽歪歪666 阅读(862) 评论(0) 推荐(0)
Python-round函数
摘要:round函数:对给定的数进行四舍五入,只有一个参数的情况下,是将其四舍五入后为整型,第二个参数是保留几位小数 1 a = round(2.523456) 2 print(a) 3 print('a的类型',type(a)) 4 b =round(2.523456,1) 5 print(b) 6 p 阅读全文
posted @ 2019-12-16 10:22 爽歪歪666 阅读(1346) 评论(0) 推荐(0)
pytorch_08_RNN
摘要:1.循环神经网络的提出是基于记忆模型的想法,期望网络能够记住前面出现的特征,并依据特征推断后面的结果,而且整体的网络结构不断循环,因而得名循环神经网络。 2.循环神经网络的基本结构特别简单,就是将网络的输出保存在一个记忆单元中,这个记忆单元和下一次的输入一起进入神经网络中。 3.使用双向循环神将网络 阅读全文
posted @ 2019-12-13 21:42 爽歪歪666 阅读(199) 评论(0) 推荐(0)
图像中尺度的理解
摘要:1.https://blog.csdn.net/weixin_33697898/article/details/93542929:同一个物体在不同的参考系下,大小不同,所以尺度发生变化 2.https://blog.csdn.net/Dorothy_Xue/article/details/82682 阅读全文
posted @ 2019-12-13 09:27 爽歪歪666 阅读(457) 评论(0) 推荐(0)
pytorch_模型参数-保存,加载,打印
摘要:1.保存模型参数(gen-我自己的模型名字) torch.save(self.gen.state_dict(), os.path.join(self.gen_save_path, 'gen_%d.pth'%step)) 2.加载模型参数 self.gen.load_state_dict(torch. 阅读全文
posted @ 2019-12-12 16:54 爽歪歪666 阅读(2538) 评论(0) 推荐(0)
pytorch——auto-encoders
摘要:自动编码器的训练方法: (1)Loss function for binary inputs (2)Loss function for real-valued inputs 阅读全文
posted @ 2019-12-11 16:31 爽歪歪666 阅读(263) 评论(0) 推荐(0)