自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(153)
  • 资源 (3)
  • 收藏
  • 关注

原创 uget以及磁力贴软件下载

ubuntu直接下载资源sudo apt install ugetubuntu下的磁力贴下载sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stablesudo apt-get install qbittorrentwindows磁力贴下载...

2019-06-20 21:34:02 3819

原创 scheme画图

import matplotlib.pyplot as pltimport numpy as np#支持中文显示from pylab import *from matplotlib import rcParamsfrom matplotlib.font_manager import FontPropertiesimport matplotlib.pyplot as plt my...

2019-06-10 11:03:59 1647

转载 matplotlib平滑曲线

this

2019-05-25 21:18:33 1937

转载 matplotlib画图

this

2019-05-24 22:18:00 247

原创 matplotlib显示中文

在开头加上如下命令from matplotlib import rcParamsfrom matplotlib.font_manager import FontPropertiesimport matplotlib.pyplot as pltmyfont = FontProperties(fname='/usr/share/fonts/opentype/noto/NotoSansC...

2019-05-24 18:21:59 247

转载 向量叉乘

this

2019-05-18 18:12:14 2997

原创 数组改变维度

首先创建一个数组,维度是[2,3,4,5]import torchimport numpy as npa=np.array(range(120)).reshape(2,3,4,5)可以看到数字是依次排列的,从最后一个维度,也就是站从[5]这个维度慢慢开始填充,填充了5个元素之后,开始扩散到[4]这个维度。b=a.reshape(5,4,3,2)可以看到b和a数组的排列...

2019-05-13 20:55:21 1105 1

原创 matplotlib初级用法

import numpy as npimport matplotlib.pyplot as pltfrom matplotlib.figure import Figurex1 = np.linspace(0.0, 5.0)x2 = np.linspace(0.0, 3.0)y1 = np.cos(2 * np.pi * x1) * np.exp(-x1)y2 = np.cos(2...

2019-05-09 09:45:10 366

转载 numpy模块中的argsort()函数(转)

thisargsort函数是Numpy模块中的函数:>>> import numpy>>> help(numpy.argsort)Help on function argsort in module numpy.core.fromnumeric:argsort(a, axis=-1, kind='quicksort', order=None)...

2019-05-06 13:24:37 312

原创 c++ vscode

vs配置,主要是配置launch.json和task.jsonlaunch.json内容{ "version": "0.2.0", "configurations": [ {              "name": "Debug",              "type": "gdb",              "request": "launc...

2019-04-26 17:25:22 501

转载 ## # C++

转# 和 ## 在宏定义(define)中经常可以看到,是预编译过程中的常用语句,本文记录了本人探索 # 和 ## 区别以及使用的内容先简单的将这两个符号进行标签化,然后再记录具体实验。#-- 转换, 完成代码到字符串的转换## -- 连接, 完成代码的连接示例:1. # 转换代码为字符串#define CONVERT(name) #nameint m...

2019-04-26 17:24:45 216

转载 void out3() const 问题

转int main() { using namespace std; class aa { int num; public: aa() { int b = 10; num = b; }; void out1() { cout << num << endl; } void out2() const { cout ...

2019-04-23 19:52:34 1129

原创 PytorchC++

import torchclass Net(torch.nn.Module): def __init__(self, N, M): super(Net, self).__init__() self.W = torch.nn.Parameter(torch.randn(N, M)) self.b = torch.nn.Parameter(torch.randn(M)...

2019-04-23 10:13:13 1675

原创 learning opencv3第三章

基本的数据类型1.基本数据类型是cv::Vec<>(里面的元素数量最多不能超过9),为什么不直接使用stl::Vec<>呢,这是因为cv::Vec<>是专门用于维度已知的小vector的。这个cv::Vec<>有许多别名,例如cv::Vec2i(2元素的整数向量),cv::Vec3i,cv::Vec4d,通式是这样的: ...

2019-04-17 21:06:42 636

原创 learning opencv3第一章

canny边缘检测算法,需要把RGB图片转成灰度图片,用如下命令cv::cvtColor( img_rgb, img_gry, cv::COLOR_BGR2GRAY);整个算法流程如下:#include <opencv2/opencv.hpp> int main( int argc, char** argv ) { cv::Mat img_rgb...

2019-04-17 15:00:50 384

转载 vs2017配置opencv

转自Win10, VS2017环境下OpenCV3.4.2的配置从官网https://opencv.org/releases.html下载OpenCV3.4.2的Win pack进行安装,安装目录便如下图所示:要能在Visual Studio中使用上述安装的OpenCV,需要如下两个步骤:1、配置相关的环境变量2、建立工程要配置相关的属性1、配置相关的环境变量...

2019-04-16 14:38:57 221

转载 c++ const

转自this#include<iostream>using namespace std;int main(){ int a1=3; ///non-const data const int a2=a1; ///const data int * a3 = &a1; ///non-const data,non-const point...

2019-04-14 11:12:12 198

原创 ubuntu双屏

xrandr --output DVI-D-0 --right-of HDMI-0 --auto开机之后要加win+p

2019-04-02 18:49:27 549 1

原创 pandas画图

import numpy as npimport matplotlib.pyplot as pltfrom pandas import Series, DataFrameimport pandas as pd a=pd.read_csv('./run-.-tag-mean_EPE(1).csv')b=a.iloc[:,1:3]c=b.iloc[:,0].valuesd=b....

2019-03-31 11:50:11 417

原创 重装windows之后,ubuntu引导不见了

重装windows的时候,需要把系统放在C盘里,需要在重装界面把C盘删除,然后就有空闲空间了,然后重新安装在C盘中。参考this,只做1~6sudo apt-get update # 先更新版本高库,再执行下面sudo add-apt-repository ppa:yannubuntu/boot-repair #添加源sudo apt-get updatesud...

2019-03-27 10:42:40 1492

翻译 pytorch前面报错module

https://github.com/bearpaw/pytorch-classification/issues/27

2019-03-23 11:32:40 305

原创 mpi测试结果

Final测试结果1041张训练集EPE=2.537以下为测试集结果FlowNetS+ft+v,论文中训练集EPE=4.44以下为测试集结果Clean测试结果1041张训练集EPE=2.264以下是测试集结果:官方FlowNet训练集误差3.36以下为测试集结果...

2019-03-19 08:59:56 736

转载 torch保存以及恢复模型

转自本文分为两部分,第一部分讲如何保存模型参数,优化器参数等等,第二部分则讲如何读取。假设网络为model = Net(), optimizer = optim.Adam(model.parameters(), lr=args.lr), 假设在某个epoch,我们要保存模型参数,优化器参数以及epoch一、1. 先建立一个字典,保存三个参数:state = {‘net':mod...

2019-03-07 15:18:42 1753

原创 align_corners=True

对应。# x_ori is the coordinate in original image #原始图像坐标x_up is the coordinate in the upsampled image:上采样图的坐标

2019-02-28 18:28:42 2530 3

转载 whatever work it was in him to do

解释如下

2019-02-28 09:50:44 508

转载 Python问题:UnboundLocalError: local variable 'xxx' referenced before assignment

2019-02-26 15:00:16 1035

原创 宾补与定语的关系

定语是修饰名词的句子成分 名词不一定是宾语 也可能是主语 表语宾语补足语 是补充说明宾语的 句子成分 与宾语 有关系判断宾补的依据 就是 看 后面的成分 与宾语的关系 有主表关系 或主谓关系 的就是 宾补否则 就不是宾补如 i have something to tell you 这是不定式作定语 因为宾语something 与不定式不是主谓关系 而是 动宾关系i ask you to o...

2019-02-22 10:17:57 1150

原创 pytorch中.data以及.detach的区别以及两种情况不能使用 inplace operation:

.data以及.detach的区别两种情况不能使用 inplace operation 

2019-02-19 13:56:44 4441

原创 释放内存

使用top命令查看内存使用的情况,然后使用kill -9 xxx杀死进程

2019-02-17 20:58:33 354

原创 清理unbuntu内核

sudo apt autoremove使用如上命令  

2019-02-16 19:02:01 374

原创 pytorch中的batchnorm

训练的时候在训练开头加上一句命令:model.train(),测试的时候在开头加上一句命令:Model.eval()。这样batchnorm的结果就不会出错。 

2019-02-13 14:55:23 1475

原创 numpy遇到问题AttributeError: type object 'numpy.ndarray' has no attribute '__array_function__'

不安装1.16,安装1.15https://github.com/numpy/numpy/issues/12736I was having the same issue. I uninstalled v1.16 and installed v1.15.4 and it imported numpy without issue

2019-01-27 09:15:15 5046

原创 net.apply(init_weights)

import torch.nn as nnimport torchimport numpy as npdef init_weights(m): print('m',m) if type(m) == nn.Linear: m.weight.data.fill_(1.0) print('mw',m.weig...

2019-01-26 18:28:56 7819

原创 tf.data迭代器问题

import tensorflow as tf import numpy as npdef __a(a): b=a+1 b=np.squeeze(b) return b a=np.array(range(5))b=tf.constant(a)dataset = tf.data.Dataset.from_tensor_slices(a)dataset = ...

2019-01-15 15:20:34 642

原创 tf.data

if split == 'train': assert(self.mode in ['train_noval', 'train_with_val']) tf_ds = tf.data.Dataset.from_tensor_slices(self._trn_idx) ##self._trn_idx是数组,对应训练样本序号的索引 ...

2019-01-15 13:35:28 328

原创 Deconvolution and Checkerboard Artifacts

在读这篇文章时候的感悟,这篇文章主要讲了出现如下情况( checkerboard pattern )产生的原因 在让神经网络生成图像的时候,通常做法都是从低分辨率开始,因为低分辨率拥有高的语义特征( high-level descriptions)。 然后神经网络可以先大略描述这张图片,然后再随后的层中填充细节。反卷积的作用:Roughly, deconvolution layer...

2019-01-11 14:01:36 1291

原创 slim.arg_scope()

slim.arg_scope可以定义一些函数的默认参数值,在scope内,我们重复用到这些函数时可以不用把所有参数都写一遍,注意它没有tf.variable_scope()划分图结构的功能,with slim.arg_scope([slim.conv2d, slim.fully_connected], trainable=True, ...

2019-01-10 21:43:52 618

原创 batchnorm问题

tf.cond()点,提示了为什么在tensorflow中需要tf.cond(),这个函数tf.nn.moments()import tensorflow as tf img = tf.Variable(tf.random_normal([128, 32, 32, 64]))axis = list(range(len(img.get_shape()) - 1))axis=[0]m...

2019-01-10 21:07:35 876

原创 PIL中的图片格式问题

 在使用PIL做数据增强的时候,需要对图片进行格式转换,Image.fromarray,这条指令无法处理float型数据,如下的报错所以需要类型转换为uint8。import numpy as npfrom PIL.ImageEnhance import *from PIL import Imagegamma = np.random.uniform(0.7, 1.5)img_...

2019-01-10 10:16:51 1343

转载 增强之gamma

https://www.cnblogs.com/guanzz/p/7416821.html

2019-01-09 21:19:15 736

OpenCV算法精解 基于Python与C++_javazx.com.zip

python 和c++调用opencv,有目录,非常清晰,非常好用

2019-07-16

Manning.Grokking.Algorithms(算法图解中文版).zip

英文版的算法图解,可以复制里面的代码,并且有目录,非常的好用!

2019-07-16

hand-on-with-tensorflow.zip

Hands_On_Machine_Learning_with_Scikit_Learn_and_TensorFlow的对应代码以及书籍,非常清晰

2019-07-17

空空如也

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

TA关注的人

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