自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 资源 (1)
  • 收藏
  • 关注

原创 ubuntu16.04安装caffe时遭遇的一个问题

Caffe的安装依赖protoc2.6.1,我的电脑在 usr/bin/ 下已有版本2.6.1,但系统环境默认使用的是我通过anaconda3安装的protoc3版本。可以通过指令 sudo protoc --version 和 protoc --version 查看系统安装的和当前默认的protoc版本,以及使用指令 whereis protoc 查看相应路径,使用指令 which prot...

2018-12-13 15:57:36 228

原创 cs231n_2017_Style_Transfer

import torchimport torch.nn as nnfrom torch.autograd import Variableimport torchvisionimport torchvision.transforms as Timport PILimport numpy as npfrom scipy.misc import imreadfrom collect...

2018-07-23 21:32:42 436

原创 整理一波pytorch训练模型的流程

import torchimport torch.nn as nnimport torch.optim as optimfrom torch.autograd import Variablefrom torch.utils.data import DataLoaderfrom torch.utils.data import samplerimport torchvision.dat...

2018-07-19 17:33:32 5428

原创 cs231n_2017_pool_or_not

cs231n的官方课程笔记里,有提到如下内容:(译文来源:知乎https://zhuanlan.zhihu.com/p/22038289?refer=intelligentunit)不使用汇聚层:很多人不喜欢汇聚操作,认为可以不使用它。比如在Striving for Simplicity: The All Convolutional Net一文中,提出使用一种只有重复的卷积层组成的结构,抛弃汇...

2018-07-17 16:36:48 211

原创 cs231n_2017_visualize_filters

保存一段可视化滤波器/卷积核的代码:from cs231n.vis_utils import visualize_gridgrid = visualize_grid(model.params['W1'].transpose(0, 2, 3, 1))plt.imshow(grid.astype('uint8'))plt.axis('off')plt.gcf().set_size_inche...

2018-07-16 10:47:01 365

原创 cs231n_2017_max_pool_naive

max_pool_forward_naive:def max_pool_forward_naive(x, pool_param): """ A naive implementation of the forward pass for a max pooling layer. Inputs: - x: Input data, of shape (N, C, H, W...

2018-07-16 09:25:40 375

原创 cs231n_2017_conv_naive

conv_forward_naive:def conv_forward_naive(x, w, b, conv_param): """ A naive implementation of the forward pass for a convolutional layer. The input consists of N data points, each with C ...

2018-07-16 09:24:00 608

原创 cs231n_2017_spatial_batchnorm

spatial_batchnorm_forward:def spatial_batchnorm_forward(x, gamma, beta, bn_param): """ Computes the forward pass for spatial batch normalization. Inputs: - x: Input data of shape (N, ...

2018-07-16 09:22:19 1067

原创 记一次成功的 Ubuntu16.04.4 + Cuda9.0 + Cudnn7

半年前我曾发起过数次战役,尽管我知道笔记本的性能跑深度学习不是那么好,但我还是幻想拥有自己的可以跑GPU的深度学习便携式平台,于是有了十次左右的重装Ubuntu的惨痛经历(其实也不能说惨,过程中学到的东西还是不少的)。半年后还是不甘心想再尝试一下。功夫不负有心人,今天终于成功了。下面我就分享一下思路和经验:一、系统及基本环境:主要参照官网的documentation,一定要仔细看,不懂的地方goo...

2018-07-13 16:37:32 747

原创 cs231n_2017_FullyConnectedNet

这是一个全连接网络,结构为:{affine - [batch norm] - relu - [dropout]} x (L - 1) - affine - softmax(也是fc_net.py里面的一个网络,纯自己写)class FullyConnectedNet(object): """ Author::Chenx """ """ A fully-con...

2018-07-09 09:51:32 454

原创 cs231n_2017_TwoLayerNet

这是一个简单的两层网络:affine - relu - affine - softmax(关于网络结构的具体描述都在函数文档里了)from builtins import rangefrom builtins import objectimport numpy as npfrom cs231n.layers import *from cs231n.layer_utils import *...

2018-07-09 09:43:12 913

原创 cs231n_2017_gradient_check

关于梯度检测的一些代码及使用示例:五种gradient_check:from __future__ import print_functionfrom builtins import rangeimport numpy as npfrom random import randrangedef eval_numerical_gradient(f, x, verbose=True, h=0...

2018-07-09 09:15:58 950

原创 cs231n_2017_softmax_cross_entropy_loss

softmax_cross_entropy_loss:(交叉熵损失)def softmax_loss(x, y): """ Computes the loss and gradient for softmax classification. Inputs: - x: Input data, of shape (N, C) where x[i, j] is the ...

2018-07-08 16:13:44 415

原创 cs231n_2017_svm_hinge_loss

svm_hinge_loss: (折叶损失)def svm_loss(x, y): """ Computes the loss and gradient using for multiclass SVM classification. Inputs: - x: Input data, of shape (N, C) where x[i, j] is the sco...

2018-07-08 16:10:35 254

原创 cs231n_2017_solver

觉得 solver.py 拿来训练很好用,存一波:目录:solver.py  ,  solver训练FullyConnectedNet  ,  外加一段可视化loss与accuracy函数的代码  。solver.py:from __future__ import print_function, divisionfrom builtins import rangefrom builtins ...

2018-07-08 16:06:16 566

原创 cs231n_2017_dropout_layer

dropout_forward:def dropout_forward(x, dropout_param): """ Performs the forward pass for (inverted) dropout. Inputs: - x: Input data, of any shape - dropout_param: A dictionary wi...

2018-07-08 15:42:34 188

原创 cs231n_2017_relu_layer

relu_forward:def relu_forward(x): """ Computes the forward pass for a layer of rectified linear units (ReLUs). Input: - x: Inputs, of any shape Returns a tuple of: - out: Out...

2018-07-08 15:39:40 409

原创 cs231n_2017_affine_layer

affine_forward:def affine_forward(x, w, b): """ Computes the forward pass for an affine (fully-connected) layer. The input x has shape (N, d_1, ..., d_k) and contains a minibatch of N ...

2018-07-08 15:37:45 1057

原创 cs231n_2017_update_rules

课程笔记及其翻译的网址:https://zhuanlan.zhihu.com/p/21930884?refer=intelligentunit一、SGD:def sgd(w, dw, config=None): """ Performs vanilla stochastic gradient descent. config format: - learning_r...

2018-07-08 15:33:12 253

原创 cs231n_2017_batchnorm

batchnorm_forward:相关的计算求导,参阅:( step4累加单元的反向传播划个重点 )https://kratzert.github.io/2016/02/12/understanding-the-gradient-flow-through-the-batch-normalization-layer.htmldef batchnorm_forward(x, gamma, beta,...

2018-07-08 11:18:37 293

原创 ml_ex8

ex8:%% Machine Learning Online Class% Exercise 8 | Anomaly Detection and Collaborative Filtering%% Initializationclear ; close all; clc%% ================== Part 1: Load Example Dataset =======...

2018-07-06 17:21:40 213

原创 ml_ex7

ex7:%% Machine Learning Online Class% Exercise 7 | Principle Component Analysis and K-Means Clustering%% Initializationclear ; close all; clc%% ================= Part 1: Find Closest Centroids =...

2018-07-06 17:18:13 172

原创 ml_ex6

ex6:%% Machine Learning Online Class% Exercise 6 | Support Vector Machines%% Initializationclear ; close all; clc%% =============== Part 1: Loading and Visualizing Data ================% Load f...

2018-07-06 17:13:06 521

原创 ml_ex5

ex5:%% Machine Learning Online Class% Exercise 5 | Regularized Linear Regression and Bias-Variance%% Initializationclear ; close all; clc%% =========== Part 1: Loading and Visualizing Data ====...

2018-07-06 17:07:25 286

原创 ml_ex4

ex4:%% Machine Learning Online Class - Exercise 4 Neural Network Learning%% Initializationclear ; close all; clc%% Setup the parameters you will use for this exerciseinput_layer_size = 400; % 2...

2018-07-06 17:02:09 189

原创 ml_ex3

ex3:%% Machine Learning Online Class - Exercise 3 | Part 1: One-vs-all%% Initializationclear ; close all; clc%% Setup the parameters you will use for this part of the exerciseinput_layer_size =...

2018-07-06 16:56:21 146

原创 ml_ex2

ex2:(略去了部分代码)%% Machine Learning Online Class - Exercise 2: Logistic Regression%% Initializationclear ; close all; clcdata = load('ex2data1.txt');X = data(:, [1, 2]); y = data(:, 3);%% =======...

2018-07-06 16:50:33 321

原创 ml_ex1

复习整理一下之前做的cousera上吴恩达老师的机器学习课程布置的编程作业:( MATLAB )ex1:(求精简略去了部分代码)%% Machine Learning Online Class - Exercise 1: Linear Regression%% Initializationclear ; close all; clc%% ==================== Part...

2018-07-06 16:39:26 173

华科随机过程实验报告

随机模拟的基本方法又称为蒙特卡罗(Monte Carlo)方法。是Velleman与Von Neumann等人在20世纪40年代为研制核武器提出来的,已大量地运用于计算机仿真试验。 随机模拟的典型步骤: 1、根据问题构建模拟系统 2、仿真系统中各种分布的随机变量 3、运行模拟系统,进行统计测量 4、分析数据,输出结果

2018-05-27

空空如也

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

TA关注的人

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