爽歪歪666
不以物喜,不以己悲,努力才是永恒的主题。
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页
摘要: 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 阅读(846) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(1298) 评论(0) 推荐(0) 编辑
摘要: 1.循环神经网络的提出是基于记忆模型的想法,期望网络能够记住前面出现的特征,并依据特征推断后面的结果,而且整体的网络结构不断循环,因而得名循环神经网络。 2.循环神经网络的基本结构特别简单,就是将网络的输出保存在一个记忆单元中,这个记忆单元和下一次的输入一起进入神经网络中。 3.使用双向循环神将网络 阅读全文
posted @ 2019-12-13 21:42 爽歪歪666 阅读(186) 评论(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 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(2486) 评论(0) 推荐(0) 编辑
摘要: 自动编码器的训练方法: (1)Loss function for binary inputs (2)Loss function for real-valued inputs 阅读全文
posted @ 2019-12-11 16:31 爽歪歪666 阅读(259) 评论(0) 推荐(0) 编辑
摘要: pytorch 中文网文档链接 https://ptorch.com/docs/1/Tensor 每一个张量tensor都有一个相应的torch.Storage保存其数据,张量类提供了一个多维的,横向视图的存储,并定义了数字操作。 img = ToTensor(img) img = img.mul_ 阅读全文
posted @ 2019-11-26 09:49 爽歪歪666 阅读(3154) 评论(0) 推荐(0) 编辑
摘要: PIL:使用Python自带图像处理库读取出来的图片格式numpy:使用Python-opencv库读取出来的图片格式tensor:pytorch中训练时所采取的向量格式 import torch import torchvision.transforms as transforms PIL to 阅读全文
posted @ 2019-11-25 21:40 爽歪歪666 阅读(942) 评论(0) 推荐(0) 编辑
摘要: 1 import Image 2 im=Image.open('test.jpg') 3 #out = im.resize((128, 128),Image.BILINEAR) #改变大小 4 #out = im.rotate(45) #45°旋转 5 #out = im.transpose(Ima 阅读全文
posted @ 2019-11-25 18:55 爽歪歪666 阅读(884) 评论(0) 推荐(0) 编辑
摘要: 1.将图片的路径和标签写入csv文件并实现读取 1 # 创建一个文件,包含image,存放方式:label pokemeon\\mew\\0001.jpg,0 2 def load_csv(self,filename): 3 if not os.path.exists(os.path.join(se 阅读全文
posted @ 2019-11-21 14:36 爽歪歪666 阅读(576) 评论(1) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页