自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Caffe编译Bug

这次在编译Caffe的过程中,出现了imread以及imencode的bug,具体部分如下:.build_release/lib/libcaffe.so: undefined reference to `cv::imencode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&

2017-11-26 20:25:43 456

原创 Pytorch框架下Finetune注意点

最近在参加AI challenger的比赛(虽然九月就开始的比赛,到11月才开始玩。。。)结局无所谓,就希望在过程中能学习一些东西,由于场景识别比赛的finetune模型权重都是torch下的,之前尝试了很多权重转化工具,但是发现基本上都不靠谱,所以比赛要继续做下去,只能转向Pytorch,花了整整两天时间来学习Pytorch,也有了较基础的一些收获,现在记录一下,也和有需要的人一起分享。1、如何入

2017-11-20 16:41:29 14537 1

转载 1×1卷积功能

之前对1×1卷积的作用的看法主要是多通道融合和降低feature map数量,最近又看到一个新说法,记录一下: 转自:http://finance.jrj.com.cn/tech/2017/07/07185122717460.shtml?utm_source=tuicool&utm_medium=referral用1×1卷积,能实现一个更复杂的网络结构,但是它的计算的复杂度反而会进一步降低,它的思

2017-07-10 10:58:34 1290

原创 深度学习资料整理

研一到现在收集了深度学习方面大量的博客和资料,主要都是网页的,也有很多有意思的code,抽空一起整理了一下,这几天慢慢放出来,资料我会分类,代码放在资料之后,下面就开始吧!

2017-05-04 22:40:16 3256

原创 112. Path Sum

题意: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary tree and s

2017-04-08 12:22:45 441

原创 130. Surrounded Regions

题意: Given a 2D board containing ‘X’ and ‘O’ (the letter O), capture all regions surrounded by ‘X’.A region is captured by flipping all ‘O’s into ‘X’s in that surrounded region.For example,X X X XX O O

2017-04-06 22:51:10 305

原创 207. Course Schedule

题意: There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a p

2017-04-04 13:44:43 296

原创 10. Regular Expression Matching

题意:Implement regular expression matching with support for ‘.’ and ‘*’.'.' Matches any single character.'*' Matches zero or more of the preceding element.The matching should cover the entire input stri

2017-03-15 20:48:16 278

原创 279. Perfect Squares

题意: Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n.For example, given n = 12, return 3 because 12 = 4 + 4 + 4; given n = 13, re

2017-03-14 20:52:17 400

原创 322. Coin Change

题意: You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of mon

2017-03-12 15:26:47 344

原创 221. Maximal Square

题意: Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area.For example, given the following matrix:1 0 1 0 01 0 1 1 11 1 1 1 11 0 0 1 0Ret

2017-03-12 13:43:21 336

原创 213. House Robber II

题意:After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This time, all houses at this place are arranged in a

2017-03-11 13:45:20 247

原创 198. House Robber

题意:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent hou

2017-03-10 23:08:50 220

原创 64. Minimum Path Sum

题意:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at a

2017-03-07 22:18:57 237

原创 152. Maximum Product Subarray

题意: Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the largest p

2017-03-06 20:27:34 235

原创 63. Unique Paths II

题意:Follow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the grid.For

2017-03-06 20:12:13 222

原创 63. Unique Paths II

题意:Follow up for “Unique Paths”:Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the grid.For

2017-03-06 17:00:53 235

原创 62. Unique Paths

题意:A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the

2017-03-06 15:14:01 267

原创 70. Climbing Stairs

题意:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive i

2017-03-05 14:40:13 222

原创 102. Binary Tree Level Order Traversal

题意:Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).For example: Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20

2017-02-25 21:49:49 198

原创 94. Binary Tree Inorder Traversal

题意:Given a binary tree, return the inorder traversal of its nodes’ values.For example: Given binary tree [1,null,2,3], 1 \ 2 / 3return [1,3,2]. 思路:二叉树的中序遍历有递归和不递归两种方法,这两种方法都需要用到O(n)

2017-02-24 21:36:29 183

原创 226. Invert Binary Tree

题意:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1思路:这题很简单,无非两种思路,栈或者递归,栈是从根到叶操作的,递归是从叶到根操作的。但是这里我一开始把代码错写成了:def invertTree(sel

2017-02-23 12:18:12 263

原创 373. Find K Pairs with Smallest Sums

题意: You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k.Define a pair (u,v) which consists of one element from the first array and one element from the second ar

2017-02-22 20:55:08 236

原创 295. Find Median from Data Stream

题意:Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. Examples:[2,3,4] , the median is

2017-02-22 14:05:59 179

原创 264. Ugly Number II

题意: Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of the first 10

2017-02-22 13:03:24 192

原创 239. Sliding Window Maximum

题意:Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window

2017-02-21 20:43:44 173

原创 84. Largest Rectangle in Histogram

题意: Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. Above is a histogram where width of eac

2017-02-17 20:59:34 165

原创 71. Simplify Path

题意:Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"Corner Cases:Did you consider the case where path = "/../"?In

2017-02-16 19:44:43 239

原创 20. Valid Parentheses

题意:Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all valid bu

2017-02-02 14:55:19 165

原创 155. Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the

2017-02-02 14:47:14 213

原创 机器学习参考资料

最近打算把这两年收集的一些资料都分享出来,看有没有时间吧,我会按照不同方向都总结一下,看的人多的话更的会勤一点,没人看就不更了(╯‵□′)╯︵┻━┻机器学习教学资料和视频 视频-徐亦达的频道-优酷视频 Coursera公开课笔记: 斯坦福大学机器学习第一课“引言(Introduction)” | 我爱自然语言处理 大数据/数据挖掘/推荐系统/机器学习相关资源 近200篇机器学习&深度学习资

2017-01-16 22:29:10 876

原创 61. Rotate List

题意:Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.思路:这题我开始的想法分别用两个指针,一个先移k位,再两个同时向前移,比如对于上

2017-01-13 15:12:06 212

原创 82. Remove Duplicates from Sorted List II

题意: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2->3->3->4->4->5, return 1->2->5.Given 1->1->1-

2017-01-13 13:58:57 184

原创 92. Reverse Linked List II

题意: Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satisfy the following

2017-01-13 13:20:39 167

原创 328. Odd Even Linked List

题意:Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.You should try to do it in p

2017-01-12 22:43:38 180

原创 445. Add Two Numbers II

题意:You are given two non-empty linked lists representing two non-negative integers. The most significant digit comes first and each of their nodes contain a single digit. Add the two numbers and return

2017-01-12 22:05:47 276

原创 234. Palindrome Linked List

题意:Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?思路:一般来说判断回文肯定不会用链表来判断的,太麻烦了。。这题的目的还是用来熟悉链表的操作,方法就是先将后一般链表反转,再以一定的间隔比较各位是否相等,比如s=’1

2017-01-12 12:19:31 379

原创 Python连续赋值需要注意的地方

在python中是可以使用连续赋值的方式来一次为多个变量进行赋值的,比如:a = b = c = 1a, b, c = 1, 1, 1这些都可以完成变量的赋值,但是就有一个问题了,比如:a = 3a, b = 1, a如果按照正常的思维逻辑,先进行a = 1,在进行b = a,最后b应该等于1,但是这里b应该等于3,因为在连续赋值语句中等式右边其实都是局部变量,而不是真正的变量值本身,比如,

2017-01-11 21:14:04 24843 4

原创 206. Reverse Linked List

题意:Reverse a singly linked list.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?参考代码(非递归):def reverseList(self, head): prev = None while head:

2017-01-11 20:04:07 315

原创 237. Delete Node in a Linked List

题意: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value

2017-01-11 19:46:23 171

空空如也

空空如也

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

TA关注的人

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