自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 资源 (2)
  • 收藏
  • 关注

原创 Windows下 Pycaffe 的配置与使用

按照我的上一篇博客:Windows 下用 build_win.cmd 直接编译CPU版caffe 配置完 caffe 以后,因为我们在的 build_win.cmd 文件中设置了 电脑上对应的python 版本,并且 BUILD_PYTHON = 1 的话,编译完成以后 pycaffe 也就一起编译好了 。默认 是BUILD_PYTHON = 1,如果之前误修改为 BUILD_PYTHON = 0

2018-01-30 20:23:02 3958

原创 557. Reverse Words in a String III -- Python

557. Reverse Words in a String IIIGiven a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Example 1:

2018-01-22 22:32:48 581

原创 344. Reverse String -- Python

344. Reverse StringWrite a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".代码:class Solution: def reverseString(self, s)

2018-01-22 22:26:47 418

原创 520. Detect Capital -- Python

520. Detect CapitalGiven a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following cases holds:

2018-01-22 22:24:57 539

原创 696. Count Binary Substrings -- Python

696. Count Binary SubstringsGive a string s, count the number of non-empty (contiguous) substrings that have the same number of 0’s and 1’s, and all the 0’s and all the 1’s in these substrings are g

2018-01-22 22:21:43 760

原创 383. Ransom Note -- Python

383. Ransom NoteGiven an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from

2018-01-22 22:14:19 770

原创 387. First Unique Character in a String --Python

387. First Unique Character in a StringGiven a string, find the first non-repeating character in it and return it’s index. If it doesn’t exist, return -1.Examples:s = "leetcode"return 0.s =

2018-01-22 22:09:27 663

原创 551. Student Attendance Record I -- Python

551. Student Attendance Record IYou are given a string representing an attendance record for a student. The record only contains the following three characters: 1. ‘A’ : Absent. 2. ‘L’ : Late. 3.

2018-01-22 22:05:36 457

原创 541. Reverse String II -- Python

541. Reverse String IIGiven a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there are less than k characters l

2018-01-22 22:00:11 634

原创 Windows 下用 build_win.cmd 直接编译CPU版caffe

1.前期准备可以看到caffe官方贴出的windows版安装对安装环境版本的说明:注:这里Python的版本只支持python2.7 或者 python3.5所以我们需要先准备好:a) VS2015 b) anaconda3: 因为现在官网最新下载的anaconda3都是python3.6版本的了,而目前caffe官方只支持到python3.5,这里给出anaco...

2018-01-18 14:37:00 6728 8

原创 747.Largest Number At Least Twice of Others -- Python

747.Largest Number At Least Twice of OthersIn a given integer array nums, there is always exactly one largest element.Find whether the largest element in the array is at least twice as much as eve

2018-01-17 23:48:43 679

原创 Leetcode刷题汇总(Easy篇) -- Python

Easy篇Array 专题561 Array Partition I | 66.5% Easy 566 Reshape the Matrix 58.0% Easy 485 Max Consecutive Ones 53.9% Easy 695 Max Area

2018-01-17 23:34:32 4334

原创 557. Reverse Words in a String III -- Python

557. Reverse Words in a String III Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Example 1:

2018-01-17 22:52:19 301

原创 344. Reverse String -- Python

344. Reverse StringWrite a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.代码:class Solution: def reverseString(self, s)

2018-01-17 22:43:14 327

原创 ”编译OpenCV, /include/opencv2下只有一个opencv.hpp文件 “的解决方法

这个问题应该只有编译 OpenCV 源码的时候才会发生,windows 下直接下载 win pack 解压缩不会碰到这个问题。接我的上一篇OpenCV的源码配置博客:Windows下 Cmake + VS 编译 OpenCV 源码在第5步中想要使用 OpenCV 去跑一下相关的例程,配置C++项目的包含目录时,却发现 /include/opencv2 下只有一个opencv.hpp 文件

2018-01-17 22:17:50 11412 3

原创 Windows下 Cmake + VS 编译 OpenCV (+ opencv_contribute)源码

windows下Cmake+VS编译OpenCV源码这里我使用的是VS2015 update3,默认大家电脑里都有VS了。1.下载Cmake点击Cmake官网的下载界面,点击下载对应版本的Cmake就可以了。下载完压缩包直接解压,无需安装。 点击开文件夹可以看见:最后一步就是把Cmake路径下的bin文件夹路径加入到电脑的环境变量。2.下载OpenCV源码

2018-01-17 21:56:10 35971 13

原创 657. Judge Route Circle -- Python

657. Judge Route Circle Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the original place.The move s

2018-01-17 21:00:46 635

原创 119. Pascal's Triangle II -- Python

119. Pascal’s Triangle II Given an index k, return the kth row of the Pascal’s triangle.For example, given k = 3, Return [1,3,3,1].Note: Could you optimize your algorithm to use only O(k) extr

2018-01-15 16:55:33 422

原创 118. Pascal's Triangle -- Python

118. Pascal’s TriangleGiven numRows, generate the first numRows of Pascal’s triangle.For example, given numRows = 5, Return:[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]]思路:

2018-01-15 16:47:46 545

原创 532. K-diff Pairs in an Array -- Python

532. K-diff Pairs in an ArrayGiven an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j), wh

2018-01-15 15:21:06 612

原创 665. Non-decreasing Array -- Python

665. Non-decreasing ArrayGiven an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-decreasing if array[i] E

2018-01-15 14:11:08 905

原创 189. Rotate Array -- Python

189. Rotate ArrayRotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note: Try to come up as many so

2018-01-15 00:02:07 524

原创 414. Third Maximum Number -- Python

414. Third Maximum Number Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).Ex

2018-01-14 23:12:30 457

原创 88. Merge Sorted Array -- Python

88. Merge Sorted ArrayGiven two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note: You may assume that nums1 has enough space (size that is greater or equal t

2018-01-09 22:55:20 368

原创 219. Contains Duplicate II -- Python

219. Contains Duplicate IIGiven an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference be

2018-01-09 22:38:51 464

原创 26. Remove Duplicates from Sorted Array -- Python

26. Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for anothe

2018-01-08 23:42:41 599

原创 643. Maximum Average Subarray I -- Python

643. Maximum Average Subarray IGiven an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the maximum average

2018-01-08 23:14:15 637

原创 53. Maximum Subarray -- Python

53. Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous su

2018-01-08 22:37:23 867

原创 35. Search Insert Position -- Python

35. Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume n

2018-01-07 14:28:26 743

原创 27. Remove Element -- Python

27. Remove ElementGiven an array and a value, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the inpu

2018-01-04 23:39:51 611

原创 724. Find Pivot Index -- Python

724. Find Pivot IndexGiven an array of integers nums, write a method that returns the “pivot” index of this array.We define the pivot index as the index where the sum of the numbers to the left of the

2018-01-04 23:09:30 957

原创 674. Longest Continuous Increasing Subsequence -- Python

674. Longest Continuous Increasing SubsequenceGiven an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray).Example 1:Input: [1,3,5,4,7]Output: 3Explana

2018-01-04 21:51:20 618

原创 268. Missing Number -- Python

268. Missing NumberGiven an array containing n distinct numbers taken from 0, 1, 2, …, n, find the one that is missing from the array.Example 1Input: [3,0,1]Output: 2Example 2Input: [9,6,4,2,3,5,7,0,1

2018-01-04 21:23:26 575

原创 628. Maximum Product of Three Numbers-- Python

628. Maximum Product of Three NumbersGiven an integer array, find three numbers whose product is maximum and output the maximum product.Example 1:Input: [1,2,3]Output: 6Example 2:Input:

2018-01-04 20:56:48 749

原创 217. Contains Duplicate--Python

217. Contains DuplicateGiven an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should ret

2018-01-03 16:37:32 691

原创 697. Degree of an Array--Python

697. Degree of an ArrayGiven a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements.Your task is to find the smallest p

2018-01-02 19:56:33 1078

原创 717. 1-bit and 2-bit Characters--Python

717. 1-bit and 2-bit CharactersWe have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11).Now given a string rep

2018-01-02 17:44:45 634

原创 169. Majority Element--Python

169. Majority ElementGiven an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the maj

2018-01-02 00:02:35 474

原创 748. Largest Number At Least Twice of Others -- Python

748. Largest Number At Least Twice of OthersIn a given integer array nums, there is always exactly one largest element.Find whether the largest element in the array is at least twice as much as every o

2018-01-01 23:47:12 578

原创 无法打开python27_d.lib(python36_d.lib)的问题

在用 VS2015 编译 Debug 版的 openCV 源码时,最后一步生成 INSTALL,碰到了下面问题:    因为配置 Windows 版 caffe 的需要,我先安装了一个 Anaconda3(3.6版本),caffe 最高支支持到 3.5 ,所以安装了一个 Anaconda2(2.7版本),openCV 用 Cmake 编译时都检测到了,所以同时碰到了这两个问题。这个是 Anacond

2018-01-01 21:21:33 11316 3

Python.Machine.Learning.2015-Sebastian Raschka

Sebastian Raschka 2015版机器学习英文版书籍下载,高清版PDF

2017-09-30

在windows和ubuntu上面使用caffe

里面收录了比较全的caffe安装教程,适合初次在Windows或者Ubuntu操作系统下实战caffe的安装,及实战mnist,cifar10数据集的举例博客,是caffe初学者的首选

2017-03-13

空空如也

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

TA关注的人

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