上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 73 下一页
摘要: from __future__ import division from torchvision import models from torchvision import transforms from PIL import Image import argparse import torch i 阅读全文
posted @ 2022-03-14 17:43 Tomorrow1126 阅读(452) 评论(0) 推荐(0) 编辑
摘要: 在[2]中,我们从style transfer中使用的Gram matrix出发,试图解释为什么Gram matrix可以代表一个图片的style这个问题。这是我看完style transfer的paper后感觉最为迷惑的一点。一个偶然的机会,我们发现这个匹配两张图的Gram matrix,其实数学 阅读全文
posted @ 2022-03-14 17:38 Tomorrow1126 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 就是feature map,只是不同叫法; feature map是卷积运算的生成结果; 阅读全文
posted @ 2022-03-14 17:37 Tomorrow1126 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 一、点乘 点乘都是broadcast的,可以用torch.mul(a, b)实现,也可以直接用*实现。 矩阵点乘,就是矩阵各个对应元素相乘,要求矩阵必须维数相等,即MxN维矩阵乘以MxN维矩阵 。 二、矩阵乘 当a, b维度不一致时,会自动填充到相同维度相点乘。 矩阵相乘有torch.mm和torc 阅读全文
posted @ 2022-03-14 16:52 Tomorrow1126 阅读(1257) 评论(0) 推荐(0) 编辑
摘要: 图像预处理转化为Tensor后的unsqueeze(0)有什么意义? image = transform(image).unsqueeze(0) 这个unsqueeze(0),感觉就仅仅在在最外层增加了一个维度,有什么意义吗? unsqueeze()这个函数主要是对数据维度进行扩充。给指定位置加上维 阅读全文
posted @ 2022-03-14 16:29 Tomorrow1126 阅读(1528) 评论(0) 推荐(0) 编辑
摘要: from torch import nn import torch from torch.utils.data import DataLoader from torchvision import transforms, datasets from torch import nn, optim imp 阅读全文
posted @ 2022-03-14 14:51 Tomorrow1126 阅读(155) 评论(0) 推荐(0) 编辑
摘要: dict() 函数用于创建一个字典。 https://www.runoob.com/python/python-func-dict.html 阅读全文
posted @ 2022-03-14 14:13 Tomorrow1126 阅读(50) 评论(0) 推荐(0) 编辑
摘要: torch.randn_like(input, *, dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) -> Tensor 返回一个和输入大小相同的张量,其由 阅读全文
posted @ 2022-03-14 11:38 Tomorrow1126 阅读(5572) 评论(0) 推荐(0) 编辑
摘要: https://zhuanlan.zhihu.com/p/36173202 阅读全文
posted @ 2022-03-14 10:58 Tomorrow1126 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1、通配符导入(不提倡)。 from os import * 2、单行导入单个模块 import json 3、单行导入多个模块 import os, sys, time 4、导入指定的模块属性 from os import path, fork, mkdir https://blog.csdn.n 阅读全文
posted @ 2022-03-14 10:39 Tomorrow1126 阅读(49) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 73 下一页