自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(59)
  • 收藏
  • 关注

原创 Ubuntu Matplotlib 安装Times字体

Ubuntu Matplotlib 安装Times字体。

2022-08-12 18:45:56 506

原创 【无标题】

timmm 库 optimizer lr

2022-06-10 15:48:23 576

原创 SSIM理解

1.向量相似性的计算内积:I&lt;x,y&gt;=∑ixi,yiI&lt;x, y&gt;=\sum_i x_i, y_iI<x,y>=i∑​xi​,yi​直观解释是:如果x大的地方y也比较大,x小的地方y也比较小,那么整体内积是偏大的,内积越大两个向量越相似。余弦相似度:由于向量内积没有界限,一种解决办法是除以长度之后再求内积CosSim...

2019-08-06 10:53:21 1329

原创 caffe2 创建lmdb数据库

import globimport osimport shutilimport imageioimport lmdbimport numpy as npfrom caffe2.proto import caffe2_pb2from data.common import write_mat_to_npyfrom caffe2.python import utils, core, ...

2019-06-12 11:03:36 395

原创 Python 计算SSIM偏低的问题

在DnCNN中利用skimage.measure.comssim(),计算SSIM时data_range不应手动设置

2019-05-20 19:54:02 1362 1

原创 python 可视化光流

def make_color_wheel(): """ Generate color wheel according Middlebury color code :return: Color wheel """ RY = 15 YG = 6 GC = 4 CB = 11 BM = 13 MR = 6 ncol...

2019-05-08 21:41:31 9487 10

转载 Non-local blcok (self-attention)

# -*- coding: utf-8 -*-"""@Author : zhwzhong@License : (C) Copyright 2013-2018, hit@Contact : [email protected]@Software: PyCharm@File : nlrn.py@Time : 2019/5/5 16:27@D...

2019-05-05 17:24:23 1512

原创 Pytorch统计参数网络参数数量

def get_parameter_number(net): total_num = sum(p.numel() for p in net.parameters()) trainable_num = sum(p.numel() for p in net.parameters() if p.requires_grad) return {'Total': total_num, ...

2019-04-30 20:11:08 11892 1

原创 Metrics2

# -*- coding: utf-8 -*-"""@Author : zhwzhong@License : (C) Copyright 2013-2018, hit@Contact : [email protected]@Software: PyCharm@File : metrics.py@Time : 2018/10/8 09:4...

2019-04-13 09:29:34 737

原创 PyTorch 测试阶段显存爆炸的一个解决方法

with torch.no_grad(): output = self.model(lr)

2019-04-04 19:32:40 3271

原创 AutoEncoder-PyTorch

import osimport h5pyimport shutilimport torch as timport numpy as npimport torch.nn as nnimport torchnet as tntfrom torchvision import transformsfrom torch.utils import datafrom tensorboardX ...

2019-03-28 21:20:22 364 2

转载 Pycharm 配置远程转发

https://www.jianshu.com/p/fd422e004f62

2019-03-28 09:21:45 955

原创 docker pycharm远程访问找不到cudnn lib 的问题

在终端输入python输入:import osprint(os.environ.get('CUDA_HOME'))print(os.environ.get('LD_LIBRARY_PATH'))获取本机环境变量地址,然后添加到pycharm环境变量中。

2019-03-01 16:04:20 499

原创 Python 递归获取文件夹里所有文件

递归获取root文件夹里所有mat文件:# -*- coding: utf-8 -*-"""@Author : zhwzhong@License : (C) Copyright 2013-2018, hit@Contact : [email protected]@Software: PyCharm@File : mean_and_std.py@...

2019-01-22 20:21:34 1788

原创 数据增强操作

将图片分成小块# -*- coding: utf-8 -*-"""@Author : zhwzhong@License : (C) Copyright 2013-2018, hit@Contact : [email protected]@Software: PyCharm@File : ImgToPatch.py@Time : 201...

2019-01-16 21:13:53 498

原创 Pycharm设置Default Server

Pycharm设置Default Server

2019-01-11 17:04:46 3854 3

转载 makefile 使用

makefile 使用https://blog.csdn.net/wcl199274/article/details/39140459

2018-09-19 22:27:20 161

转载 在Ubuntu的左侧启动栏添加应用程序

链接地址: https://blog.csdn.net/gavin_8724/article/details/72857759

2018-09-14 10:32:03 2802

转载 PyTorch Variable与动态图

https://mp.weixin.qq.com/s/OMjfck4jlMneGZ1NJxbjKQfor data, label in trainloader: ...... out = model(data) loss = criterion(out, label) loss_sum += loss # &lt;--- 这里 .........

2018-03-20 08:58:15 1258

原创 Pytorch读取图片并显示

# -*- coding: utf-8 -*-# @Time : 18-3-15 下午6:43# @Author : zhwzhong# @File : model.py# @Contact : [email protected]# @Function:from torchvision import transforms, datasets as dsimpo...

2018-03-15 21:24:28 16096 2

原创 Pytorch快速入门一-Tensor

TensorVariableTensor Tensor 可以简单地认为是一个数组,且支持高效的科学计算。基础操作: 从接口的角度讲,对tensor可以分为两类: torch.function,如torch.add(a,b)tensor.function,如a.add(b)这两种功能是等价的。从存储角度讲,可以分为以下两类: 不会修改自身的数据,如...

2018-03-09 21:32:34 10688

原创 Python yield生成器

Python 中可以通过列表生成式,创建列表,并且可以通过列表迭代访问列表里的每一个元素,如果元素数量很大,而且只需访问前几个元素,使用列表将会造成很大的浪费,生成器就是为了解决这种问题而设计的。创建generator的方法1. 把[]改成()alist = [x*x for x in range(5)]print(alist)blist = (x*x for x i

2018-02-01 22:08:49 271

原创 MIT线性代数第十讲-四个基本的子空间

四个基本的子空间列空间C(A)、行空间,也是(AT)" role="presentation" style="position: relative;">(AT)(AT)(A^T)的列空间、零空间、AT" role="presentation" style="position: relative;">ATATA^T的零空间。维数:A: m * nA的零空间在Rn" role="pres

2018-01-27 20:28:48 538

原创 MIT线性代数第九讲-线性相关、线性无关

解的存在性:Ax=b,A.shape=(m,n),m<n" role="presentation" style="position: relative;">A.shape=(m,n),mnA.shape=(m,n),mnA.shape=(m, n), m,未知数的个数大于方程的个数,由此推断:Ax=0存在非0解,Ax=0的解存在的原因是矩阵消元后存在自由列。线性相关性:

2018-01-27 20:10:23 1878

原创 求解Ax=b:可解性和解的结构

是否有解:求解一下方程组: {x1+2x2+2x3+2x4=b12x1+4x2+6x3+8x4=b23x1+6x2+8x3+10x4=b3" role="presentation">⎧⎩⎨⎪⎪x1+2x2+2x3+2x4=b12x1+4x2+6x3+8x4=b23x1+6x2+8x3+10x4=b3{x1+2x2+2x3+2x4=b12x1+4x2+6x3+8x4=b23x1+6x2+8x3

2018-01-27 19:08:17 4497

原创 MIT线性代数第七讲-求解$Ax=0$,主变量、特解

消元法求解Ax=0 消元过程中,从一个方程减去另一个方程的倍数,解是不会改变的,因此零空间不会改变,右侧向量始终是0,可以省去不写。A=[1222246836810][x1x2x3x4]=[0000]" role="presentation">A=⎡⎣⎢⎢1232462682810⎤⎦⎥⎥⎡⎣⎢⎢⎢⎢x1x2x3x4⎤⎦⎥⎥⎥⎥=⎡⎣⎢⎢⎢⎢0000⎤⎦⎥⎥⎥⎥A=[1222246

2018-01-27 17:13:03 531

原创 MIT线性代数第六讲-列空间和零空间

列空间主列零空间NULL Space1. 列空间矩阵A=[112213314415]" role="presentation">A=⎡⎣⎢⎢⎢⎢123411112345⎤⎦⎥⎥⎥⎥A=[112213314415]A = \begin{bmatrix}1 &1 &2 \\2 & 1 & 3 \\3 & 1 & 4\\4 & 1 &5\end{bmatrix}

2018-01-27 14:45:36 354

原创 MIT线性代数第五讲-转置-置换-向量空间R

置换矩阵用来完成行交换的矩阵。n阶矩阵一共有n!个置换矩阵。所有置换矩阵均可逆,并且P−1=PT" role="presentation" style="position: relative;">P−1=PTP−1=PTP^{-1}=P^T。转置和对称矩阵对称矩阵即A=AT" role="presentation" style="position: rela

2018-01-27 11:46:22 451

原创 MIT线性代数第四讲:LU分解

ALU分解两个基本公式LU分解求L行互换的情形A=LU分解 A=LU分解是最基本的矩阵分解,L是指下三角矩阵,U是指上三角矩阵。U可以通过矩阵消元得到,那么L又是如何得到的呢?两个基本公式(AB)−1=B−1A−1" role="presentation" style="position: relat

2018-01-27 11:14:34 2581 1

原创 MIT线性代数第二讲-矩阵乘法和消元法

矩阵乘法和矩阵消元矩阵乘法5种方法C AB矩阵的逆Gauss-Jordan消元法求矩阵的逆消元法求解方程组置换矩阵矩阵乘法和矩阵消元矩阵乘法(5种方法)C=AB" role="presentation" style="position: relative;">C=ABC=ABC = AB常规方法,左行乘以右列:C=AB" role="presen

2018-01-26 21:23:16 813

原创 MIT线性代数第一讲方程组的几何解释

核心思想:向量间的基本运算时数乘cv" role="presentation" style="position: relative;">cvcvcv和加法v+w" role="presentation" style="position: relative;">v+wv+wv+w,其中v" role="presentation" style="position: relative;">vvv和

2018-01-26 16:13:51 241

原创 cs231n_knn实现

cs231n_knn相似性度量交叉验证方差和偏差knn算法cs231n_knn相似性度量 两个向量之间的距离的计算,也称为样本之间的相似性度量。他反应为某类事物在距离上接近或远离的程度。在介绍距离之前,先看一个概念。范数:可以简单、形象的理解为向量的长度,或者向量到坐标系原点的距离。 (1)、L1范数:||x||为x向量各个元素绝对值之

2018-01-24 20:36:39 257 1

原创 cs231n 2017第一课

CS231n 2017第一课Python Tutorials容器NumpyScipyCITAR-10 datasetCS231n 2017第一课Python Tutorials容器列表:(遍历列表的方法) animals = ['cat', 'dag', 'monkeys'] for animal in animals:

2018-01-24 11:15:19 257

原创 MATLAB简单入门三

The best way to get started with MATLAB is to learn how to handle matrices。输出格式:>> x = [4/3 1.2345e-7]x = 1.3333 0.0000>> format short>> x = [4/3 1.2345e-7]x = 1.3333 0

2018-01-20 22:52:50 154

原创 MATLAB简单入门二

数组下标(在MATLAB中,每一个变量都是一个数组,可以通过下标访问变量里面的元素)>> a = magic(4)a = 16 2 3 13 5 11 10 8 9 7 6 12 4 14 15 1>> a(1, 1)ans = 16>>

2018-01-20 22:27:45 281

原创 MATLAB简单入门一

创建变量 矩阵和向量 创建一个含有四个元素的向量,可以使用逗号或者空格隔开。a是一个行向量。 >> a = [1 2 3 4]a = 1 2 3 4>> a = [1, 2, 3, 4]a = 1 2 3 4>> size(a)ans = 1 4>>

2018-01-20 21:56:36 638

原创 Pytorch快速搭建神经网络

import torchnet = torch.nn.Sequential( torch.nn.Linear(2, 10), torch.nn.ReLU(), torch.nn.Linear(10, 2),)print(net)

2018-01-17 19:37:03 532

原创 Pytorch中的Varible

# -*- coding: utf-8 -*-# @Time : 2018/1/17 18:36# @Author : Zhiwei Zhong# @Site : Variable 和 tensor 的区别# @File : Variable.py# @Software: PyCharmimport torchfrom torch.autograd import

2018-01-17 19:18:39 296

原创 pytorch和Numpy的区别以及相互转换

# -*- coding: utf-8 -*-# @Time : 2018/1/17 16:37# @Author : Zhiwei Zhong# @Site : # @File : Numpy_Pytorch.py# @Software: PyCharmimport torchimport numpy as npnp_data = np.arange(6)

2018-01-17 19:17:54 51437 1

原创 Pytorch实现简单的回归

# -*- coding: utf-8 -*-# @Time : 2018/1/17 18:48# @Author : Zhiwei Zhong# @Site : 回归# @File : Regression.py# @Software: PyCharmimport torchfrom torch.autograd import Variableimport t

2018-01-17 19:16:59 632

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除