自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

chenwei的博客

士人有百折不回之真心,方有万变不穷之妙用。

  • 博客(78)
  • 资源 (4)
  • 收藏
  • 关注

原创 docker全流程使用指南

docker全流程使用指南

2023-06-07 11:14:03 3393

原创 ubuntu server 开机自动登录并启动jupyter lab

如果你的 Ubuntu Server 系统没有安装桌面环境,就没有 lightdm 管理器可用了,开机自动登录需要用到 tty。用户的 bashrc 配置文件中,使得每次打开终端,都会自动启动。接下来创建启动命令的脚本,使用以下命令创建一个名为。命令是为了等待系统启动完成,防止启动脚本失败。用户会自动登录到 tty1 终端,并启动。只有当不是在桌面环境下,而且当前终端是。中,这样就不会在终端中产生输出。用户登录到 tty1 终端时,接下来,需要将脚本添加到。重启系统,等待系统启动,

2023-06-06 11:53:01 1329

原创 解决TensorFlow出现的Could not load dynamic library ‘libcurand.so.10‘等类似的问题

其中第一个是我想要的,因为这个是我环境中的,但是要注意,我们指定到达。说明已经可以识别GPU咯。

2023-05-29 22:44:46 814

原创 下载合适的nvidia驱动以使用nvidia-smi

参考:参考资料

2023-05-07 20:40:56 88

原创 ubuntu查看网络相关信息

ubuntu查看网络相关信息

2023-05-07 20:39:52 2816 1

原创 Ubuntu远程桌面连接——基于xrdp

基于xrdp的ubuntu远程桌面连接设置过程以及常见问题

2023-04-10 21:10:35 2252

原创 修改配置文件解决matplotlib中文与正负号乱码问题

【代码】修改配置文件解决matplotlib中文与正负号乱码问题。

2022-12-29 20:45:35 1215

原创 jupyter创建新环境与新kernel

jupyter创建新环境与新kernel

2022-08-31 15:50:56 1962

原创 pytorch统计模型参数数量

pytorch统计模型参数数量

2022-08-23 15:20:00 815

原创 Latex将放缩表格至指定大小

Latex将放缩表格至指定大小

2022-08-22 21:35:20 1000

原创 Latex多子图

Latex多子图

2022-08-22 21:30:03 502

原创 Ubuntu远程控制注意事项

Ubuntu远程控制注意事项

2022-08-17 21:02:25 2227

原创 图像按照网格形状展示的python实现

图像按照网格形状展示的python实现

2022-08-10 20:22:59 699

原创 Linux/Windows系统下配置并开启远程Jupyter lab访问

linux服务器

2022-07-27 17:36:54 273

原创 Jupyter配置虚拟环境及安装Python包时遇到的问题

安装Python包时遇到的问题

2022-07-22 16:21:55 551

原创 论文中比较好看的图

不断更新中…

2022-03-26 21:03:15 1980

原创 pytorch随机数种子设置

if args.seed is not None: torch.manual_seed(args.random_seed) torch.cuda.manual_seed(args.random_seed) torch.cuda.manual_seed_all(args.random_seed) np.random.seed(args.random_seed) random.seed(args.random_seed) tor

2021-12-01 20:16:52 1152

原创 latex自定义图片命名前缀以及设定表格名称范围与大小

自定义前缀\NeedsTeXFormat{LaTeX2e}[2007/10/19]\ProvidesClass{cpbtex}[2014/11/12 v1.0 LaTeX Template for Chinese Physics B]\LoadClass[a4paper]{article}[2007/10/19]\RequirePackage{amsmath,amsfonts,amssymb,bm,CJK,ccmap}\RequirePackage{graphics,epstopdf,ifpd

2021-11-20 17:50:59 2471

原创 论文绘图与合成图片过程中常见问题

1、PIL格式与cv2格式的转换问题详见Stack overflowTo convert from PIL image to OpenCV use:import cv2import numpy as npfrom PIL import Imagepil_image=Image.open("demo2.jpg") # open image using PIL# use numpy to convert the pil_image into a numpy arraynumpy_image=

2021-11-04 21:46:49 1932

原创 matplotlib相关注意事项

1、正常显示中文与正负号plt.rcParams['font.sans-serif']=['SimHei'] # 正常显示中文plt.rcParams['axes.unicode_minus']=False # 正常显示负号2、运行过程中不显示绘图import matplotlibmatplotlib.use('Agg') # 不显示绘图import matplotlib.pyplot as plt这里需要注意,matplotlib.use('Agg')需要在导入pyplot前

2021-07-13 11:44:57 306

原创 pytorch中几个常见的需要重写的类

文章目录1 Dataset类2 自定义transform3 自定义网络结构由于是初学者,目前在学习过程中遇到的就以上三类,如果还有其他的话欢迎补充。1 Dataset类有时候需要使用我们自己的数据集,而非pytroch自带的数据集,这时候就有必要改写Dataset类了。相关操作见 Dataset类的改写,里面写得比较详细了,摘录几句比较重要的话。当我们集成了一个 Dataset类之后,我们需要重写 __len__ 方法,该方法提供了dataset的大小; __getitem__ 方法, 该方法支持

2021-04-08 11:29:47 857

原创 解决tensorflow_gpu-2.3.1 出现“Could not load dynamic library ‘cudart64_101.dll‘的问题

先上问题import tensorflow as tf2020-11-30 09:54:16.112235: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found2020-11-30 09:54:16.112420: I tensorflow/stream_

2020-11-30 10:48:33 789

原创 Python语言Codewars实战——Sudoku Solution Validator(4 kyu)

Description:Sudoku BackgroundSudoku is a game played on a 9x9 grid. The goal of the game is to fill all cells of the grid with digits from 1 to 9, so that each column, each row, and each of the nine 3x3 sub-grids (also known as blocks) contain all of the

2020-11-22 11:04:30 341

原创 Python实战——VAE的理论详解及Pytorch实现

2.1 设定优化目标这一部分引入是因为一个问题:在通过采样的方法(蒙特卡洛法)计算下面这个式子的时候可不可以走捷径(shortcut)?实际上(in practice),对大多数的潜变量zzz而言,P(X∣z)P(X|z)P(X∣z)都是nearly zero的,因此它们对我们估计P(X)P(X)P(X)是没啥用的。这里就涉及到了VAE的核心思想了:尽量只采样那些对生成XXX 有贡献的zzz,然后用它们估计P(X)P(X)P(X) 。那么问题来了,从哪个分布里面去采样才能达到这个目的呢?不妨假设

2020-11-18 18:39:21 27569 16

转载 机器学习小知识——神经网络的L1和L2正则化

有时候在求解规划问题时,我们想要让得到的解满足一定的条件,换句话说,如果得到的解不能满足一定的条件我们更加倾向于拒绝它,而且这种倾向还是比较大的。这种情况在实际应用中比较常见,比如在准备出去旅行时,我们肯定不太希望背包里面放置特别重的东西,这时候就可以加一个条件,如果物品的重量大于一个给定的临界值,那么它的价值将大大降低,而这种大大降低可以通过给其添加一个很大的系数实现。同样的,在求解神经网络损失函数的最小值时,我们希望自变量权重向量www满足一定的条件,如果不满足,就给其狠狠地惩罚一下。这时候我们就会在

2020-11-05 18:03:04 2633

原创 Error loading “D:\Coding\Anaconda\lib\site-packages\torch\lib\asmjit.dll“

OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\chunc\anaconda3\lib\site-packages\torch\lib\asmjit.dll" or one of its dependencies.这个问题简直坑人,我在CSDN等国内的博客网站找的解决办法都是更新numpy,可谁知numpy没更新好,我的Spyder倒是莫名其妙地卸了,弄的我只能重装Anaco

2020-11-02 18:51:00 12743 13

原创 MATLAB实战——微分方程组的解法之欧拉法与4阶龙格库塔法

实现:%%Question 1 part(b)clear all;clc;t0 = 0;x0 = 1/2;dt = 0.1;tf = 1;t_range = t0:dt:tf;x_EU = zeros(1,length(t_range));x_EU(1)= x0;x_RK = zeros(1,length(t_range));x_RK(1)= x0;for k = 1:length(t_range) - 1 x_EU(k+1) = euler_scheme(x_EU...

2020-10-31 16:35:23 2259 3

原创 R语言Codewars实战——Sum by Factors(4kyu)

Description:Given an array of positive or negative integersI= [i1,..,in]you have to produce a sorted array P of the form[ [p, sum of all ij of I for which p is a prime factor (p positive) of ij] ...]P will be sorted by increasing order of the prime nu

2020-08-19 14:03:08 377

原创 R语言Codewars实战——Best travel(5kyu)

Description:John and Mary want to travel between a few towns A, B, C … Mary has on a sheet of paper a list of distances between these towns. ls = [50, 55, 57, 58, 60]. John is tired of driving and he says to Mary that he doesn’t want to drive more than t

2020-08-18 22:57:01 771

原创 R语言Codewars实战——Exponentials as fractions(4kyu)

Description:The aim is to calculate exponential(x) (written exp(x)in most math libraries) as an irreducible fraction, the numerator of this fraction having a given number of digits.We call this function expand, it takes two parameters, x of which we want

2020-08-18 18:24:55 463

原创 R语言Codewars实战——Fibo akin(5kyu)

Description:Be u(n) a sequence beginning with:u[1] = 1, u[2] = 1, u[3] = 2, u[4] = 3, u[5] = 3, u[6] = 4,u[7] = 5, u[8] = 5, u[9] = 6, u[10] = 6, u[11] = 6, u[12] = 8,u[13] = 8, u[14] = 8, u[15] = 10, u[16] = 9, u[17] = 10, u[18]

2020-08-17 00:32:16 291

原创 R语言Codewars实战——Twice linear(4kyu)

Consider a sequence u where u is defined as follows:The number u(0) = 1 is the first one in u.For each x in u, then y = 2 * x + 1 and z = 3 * x + 1 must be in u too.There are no other numbers in u.Ex: u = [1, 3, 4, 7, 9, 10, 13, 15, 19, 21, 22, 27, …]

2020-08-16 22:34:34 280

原创 R语言Codewars实战——Number of trailing zeros of N!(5kyu)

Description:Write a program that will calculate the number of trailing zeros in a factorial of a given number.N! = 1 * 2 * 3 * … * NBe careful 1000! has 2568 digits…For more info, see: http://mathworld.wolfram.com/Factorial.htmlExampleszeros(6) = 1#

2020-08-16 11:34:30 268

原创 R语言Codewars实战——Rainfall

说明:这道题是真难到我了,主要是我不清楚怎么把字母之间的数字匹配出来,我初始的时候想的是正则表达式,但是R语言的正则表达式与我在python中学到的不同,且更加麻烦复杂,再者我又对正则表达式一知半解的,脑子真就慢慢变得迷糊了,直接看了别人的解法(整半天经验没变化,难受啊)。Description:data and data1 are two strings with rainfall records of a few cities for months from January to December.

2020-08-14 17:46:40 372

原创 R语言Codewars实战——Last digit of a large number(5kyu)

Description:Define a function that takes in two non-negative integers a and b and returns the last decimal digit of a^b. Note that a and b may be very large!For example, the last decimal digit of 9^7 is 9, since 9^7 = 4782969. The last decimal digit of (

2020-08-13 23:47:06 1250

原创 R语言Codewars实战——Help the bookseller !(6kyu)

Description:A bookseller has lots of books classified in 26 categories labeled A, B, ..., Z. Each book has a code c of 3, 4, 5 or more characters. The 1st character of a code is a capital letter which defines the book category.In the bookseller’s stockli

2020-08-13 11:03:24 255

原创 MATLAB与Python实战——二维向量与等高线的绘制

代码前部分是求解偏微分方程,后面一部分是绘图。在绘图的过程中,主要难点有两个:第一, 如何使用python或MATLAB绘制等高线以及热力图,并把它们叠加在一张图上。第二,如何使用python或MATLAB绘制二维的向量图。MATLAB实现代码:% Solution of 2D Stokes and continuity equations with finite differences% on a regular grid using stream function - vorticit

2020-08-12 16:56:08 1350

原创 MATLAB实战——回归分析、回归诊断与异常值的查找

例1clear,clc%% 数据准备x1 = [7 1 11 11 7 11 3 1 2 21 1 11 10]';x2 = [26,29,56,31,52,55,71,31,54,47,40,66,68]';x3 = [6 15,8,8,6,9,17,22,18,4,23,9,8]';x4 = [60,52,20,47,33,22,6,44,22,26,34,12,12]';y = [78.5 74.3 104.3 87.6 95.9 109.2 102.7 72.5 93.1 115.9

2020-07-10 20:30:35 6889 2

原创 MATLAB实战——方差分析

例1例2例3

2020-07-10 20:19:10 3776

原创 MATLAB实战——图片噪声的添加与平滑处理

加入高斯白噪声并作平滑处理clear,clc%% (1) 读取数据A = imread('LenaRGB.jpg');%% (2)在数据中加入高斯白噪声作平滑处理% 加入高斯白噪声B = double(A)/255;[m,n,p] = size(B); % 大小white_noise = 0 + 0.1*randn(m,n); % 白噪声C = B + white_noise; % 加白噪声D = C*255; %将像素范围扩大至0--255D2 = uint8(D);

2020-07-10 20:14:33 1664

单总体与多总体ANOVA方差分析.zip

里面包含有单因素ANOVA与多因素ANOVA方差分析的详细理论推导以及相关具体实例,基本上只需要看这一份资料就可以把ANOVA看懂了,同时里面还有SPSS的实现结果分析

2020-04-13

旅行-爬虫 数据分析源码.zip

旅游攻略选择

2020-04-03

九型人格心理测试工具 等1个文件.zip

一款人格测试软件

2020-04-02

基于Python的两例词云实战代码与数据.zip

两个python词云实战案例的代码与数据,编译软件为Jupyter Notebook,里面详细地描述了数据的爬取、词云的构造方法等一系列的问题,由简入繁,通俗

2020-03-03

空空如也

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

TA关注的人

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