- 博客(97)
- 收藏
- 关注
原创 请各位支持参加深度学习数据翻译开源项目
https://github.com/ExtremeMart/DeepLearningBook-CN本项目是Ian Goodfellow 、 Yoshua Bengio 和Aaron Courville大神的Deep Learning Book的中文翻译开源项目,欢迎各位有志趣的人士加入!本人已翻译完成第一章,正在校对中,校对组现在还缺人,希望各位联系加入!
2016-11-19 16:50:43
1503
原创 Ubuntu+Tesla M40上OpenCL问题解决过程
前些天配置了一台GPU机器,装了opencl,也装了OpenCV,OpenCV安装的时候使用了WITH_OPENCV=ON选项。后面在准备数据库的使用,使用了caffe自带的conver_imageset工具,总是出现core dump。由于caffe是release编译的,gdb不出什么信息,显示错误在LMDB中感觉不太可能是LMDB的问题,于是编译了debug版本的conver_imageset
2016-11-19 16:42:41
1546
翻译 如何调试神经网络(深度神经网络)
神经网络的调试基本上难于绝大多数的程序,因为大部分的神经网络的错误不会以类型错误或运行时错误显现,他们只是使得网络难以收敛。如果你是一个新人,这可能会让你非常沮丧。一个有经验的网络训练者可以系统的克服这些困难,尽管存在着大量似是而非的错误信息,比如:你的网络训练的不太好。对缺少经验的人来说,这个信息令人却步;但对有经验的人来说,这是一个非常好的错误消息。它意味着样板代码已经偏移了正确道路,而且是时
2016-10-27 20:37:24
3318
原创 使用caffe训练时Loss变为nan的原因
梯度爆炸原因:梯度变得非常大,使得学习过程难以继续现象:观察log,注意每一轮迭代后的loss。loss随着每轮迭代越来越大,最终超过了浮点型表示的范围,就变成了nan。措施:减小solver.prototxt中的base_lr,至少减小一个数量级。如果有多个loss layer,需要找出哪个损失层导致了梯度爆炸,并在train_val.prototxt中减小该层的loss_weight,而非是减小
2016-10-27 17:29:27
15027
原创 人流密度(crowd counting)估计方法
人流密度估计方法在深度学习起来之前主要有两种,直接估计和间接估计。近两年又有几篇做的不错的是使用cnn来进行估计。面临的挑战要进行准确的人流密度估计,面临了如下的难点 1.低分辨率:可以看看UCF Crowd Counting 50这个数据集,在很多密集的情况下,一个人头的pixel可能只有5*5甚至更小,这就决定了基于检测的很多方法都行不通; 2.遮挡严重:在人群中,头肩模型都难以适用更不用说
2016-10-27 17:04:37
22003
7
原创 Face Alignment at 3000 FPS 阅读笔记
《Face Alignment at 3000 FPS》 又是msra孙剑组一篇cvpr大作,之前实现了他之前的一篇《Face Alignment by Explicit Shape Regression 》(ESR), 当时速度应该是50fps左右,新算法已经到了3000fps。前一篇的思路是双层随机蕨做回归器 + shape indexed feature(计算复杂度相当低)。这一次用的思路是
2016-07-06 17:18:30
3887
3
原创 初探随机蕨(Random Ferns)
最近在做人脸对齐的时候,看到两篇famous的文章《Face Alignment at 3000 FPS via Regressing Local Features》以及《Face Alignment by Explicit Shape Regression》都使用了随机蕨来做人脸特征点的回归预测。先回想一下随机森林。随机森林是很多棵决策树组成的,每颗决策树使用部分的训练样本以及部分的训练特征,并在
2016-06-21 20:44:05
7415
2
原创 mac安装caffe(避免踩坑的脚本)
#本人把要踩得坑都踩完了,比如pycaffe和cv2一起import导致protobuf出现错误啦#opencv没被link导致找不到啦 #安装opencv brew install opencv3 --with-contrib --with-ffmpeg --with-tbb --with-qt5 --with-python export OpenCV_DIR=/usr/
2016-03-15 18:06:50
7133
1
原创 Iterm 2 配色, 有颜色的MAC终端
1.首先在~/.bash_profile中写入export CLICOLOR=1export LSCOLORS=gxfxcxdxbxegedabagacadexport PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ 'export TERM=xterm-colorexport CLICOL
2016-03-05 11:07:09
4806
原创 STL map/ unordered_map/ vector内存使用实验
some memory test > image2016-2-23 11:16:10.png" width="320" src="http://wiki.dev.fwmrm.net/download/attachments/73652548/image2016-2-23+11%3A16%3A10.png?version=1&modificationDate=1456197941000" alt="
2016-02-23 11:32:10
1362
原创 LevelDB简介及入门手册
LevelDB是Google开源的持久化KV单机数据库,具有很高的随机写,顺序读/写性能,但是随机读的性能很一般,也就是说,LevelDB很适合应用在查询较少,而写很多的场景。根据Leveldb官方网站的描述,LevelDB的特点和限制如下:特点:1、key和value都是任意长度的字节数组;2、entry(即一条K-V记录)默认是按照key的字典顺序存储的,当然开发者也可以重载这
2016-02-19 20:09:28
2150
原创 几种malloc实现原理 ptmalloc(glibc) && tcmalloc(google) && jemalloc(facebook)
最近公司的线上代码出现了持续性的内存增长,已经恶化到需要定时重启来解决。使用valgrind检测不出内存泄露,自己写了一个类似bound checker内存泄露的检测工具(更小更灵活),倒是track到一些泄露,但仍然不符合泄露的量级。最后估计到有可能是glibc的内存分配机制导致的内存碎片问题,heap的孔洞很多,但free的时候并不能归还到操作系统,于是对市面上的一些malloc进行调研,分析
2016-02-19 19:59:39
10297
3
原创 编写内存泄露检测器的方法选择以及实现方式 c++
目的目前线上代码有一定的内存泄漏问题,大多数情况下这种bug都难以追踪定位,因此想开发一个内存监测小工具。需要两种监测方式。一种是全局监测,纪录每一次内存的分配和释放活动;另一种是较为轻量级的监测,只监测部分疑似存在泄漏的code。内存监测需要hack进内存分配和释放相关的代码,监测其每次的活动。方法选择1.重载new/delete首先想到的是对管理动态分配
2016-02-19 13:09:09
3101
5
原创 Typical memory leak (C++中典型的内存泄露)
DefinitionMemory Leak: leak on the heap, memory allocation during runtime1.Frequent Memory Leak: a code include memory leak is used frequently (most dangerous but relatively easy to find)2
2016-02-19 09:46:39
2464
原创 Simplify Path
Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"click to show corner cases.使用栈即可,遇到".."弹出上一个cl
2014-12-03 21:45:52
530
原创 Word Break II
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such possible sentences.For example, givens = "
2014-11-16 12:08:07
571
原创 Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total numb
2014-11-16 11:44:00
502
原创 Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover t
2014-11-15 19:53:16
438
原创 N-Queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-queens puzzle.Eac
2014-09-12 10:54:59
587
原创 First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses constan
2014-09-09 10:27:54
529
原创 Validate Binary Search Tree
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys less than the node's key.Th
2014-08-28 23:25:48
474
原创 4Sum
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note:Element
2014-08-28 23:15:16
502
原创 Text Justification
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You should pack your words in a greedy approach; that i
2014-08-28 21:32:45
451
原创 Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Panama" is a palindrome."race a car" is not a
2014-08-27 10:14:35
477
原创 Permutations
Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1].
2014-08-26 14:54:35
601
转载 SVM中的对偶问题、KKT条件以及对拉格朗日乘子求值得SMO算法
SMO算法由Microsoft Research的John C. Platt在1998年提出,并成为最快的二次规划优化算法,特别针对线性SVM和数据稀疏时性能更优。关于SMO最好的资料就是他本人写的《Sequential Minimal Optimization A Fast Algorithm for Training Support Vector Machines》了。我拜读了一下,下
2014-08-22 18:11:57
10170
原创 Anagrams
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.class Solution {public: vector anagrams(vector &strs) { vector res
2014-08-22 08:12:05
550
原创 Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of convertin
2014-08-21 21:55:32
491
原创 Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST./** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; *
2014-08-21 17:58:13
511
原创 Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?
2014-08-21 17:22:26
501
原创 3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact
2014-08-21 16:43:39
532
原创 Minimum Depth of Binary Tree
Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
2014-08-21 09:02:54
409
原创 3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet (a,b,c)
2014-08-20 23:17:32
455
原创 Populating Next Right Pointers in Each Node II
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution still work?Note:You may only use constant extr
2014-08-20 21:19:25
560
原创 Clone Graph
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separator for ea
2014-08-20 13:38:44
466
原创 Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy of the list.
2014-08-14 22:39:34
506
原创 String to Integer (atoi)
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca
2014-08-14 14:31:16
478
原创 Best Time to Buy and Sell Stock II
ay you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one
2014-08-13 21:31:53
545
原创 Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe
2014-08-13 21:12:43
488
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人