爽歪歪666
不以物喜,不以己悲,努力才是永恒的主题。
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页
摘要: x.norm()函数:http://www.pythonheidong.com/blog/article/170104/torch.autograd.grad函数:计算张量的梯度函数,返回值的shape和函数输入的值的shape一致outputs:函数的输出inputs:函数的输入 grad_out 阅读全文
posted @ 2020-01-02 11:34 爽歪歪666 阅读(1197) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(10417) 评论(0) 推荐(1) 编辑
摘要: http://www.voidcn.com/article/p-qrqsxppp-bum.html 阅读全文
posted @ 2019-12-26 21:47 爽歪歪666 阅读(1354) 评论(0) 推荐(0) 编辑
摘要: 在训练集和测试集数据预处理时,需要对数据进行标准化 训练集使用fit_transform 测试集使用transform 例如: StandardScaler类是一个用来讲数据进行归一化和标准化的类 1 from sklearn.preprocessing import StandardScaler 阅读全文
posted @ 2019-12-26 16:55 爽歪歪666 阅读(2273) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/qianxiayi/p/9025400.html 阅读全文
posted @ 2019-12-25 15:41 爽歪歪666 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 安装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 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(764) 评论(0) 推荐(0) 编辑
摘要: lambda用来编写简单的函数 lamda表达式一般格式: 接收返回的值 = lambda 参数(一个或者多个):表达式 阅读全文
posted @ 2019-12-18 10:55 爽歪歪666 阅读(247) 评论(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 阅读(506) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(5806) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页