自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Readme

Show Tell Captioning(项目题目)This is a project for show-tell image captioning.The result … (简单介绍)Requirements(环境要求)To run this project.You may need following software packages. python 2.7 etc.Pretrained

2017-11-29 12:19:34 304

原创 Pytorch学习笔记(三)线性回归与逻辑回归

在了解了Pytorch的一些机制后,当然要进行一些实例的学习,毕竟实践出真知嘛。 对于所有的机器学习爱好者来说,第一个要学的模型无疑是线性回归 所谓线性回归,指的就是用对输入数据的每个维度进行线性组合拟合Label-y。最简单的线性回归即是二维平面内的直线拟合。为此我们可以编造一些数据:import torch import torch.nn as nn import numpy as np i

2017-11-19 23:00:54 2227

原创 pytorch学习笔记(二) 其他机制

broadcast机制 pytroch中的tensor和numpy中的ndarray一样是支持broadcast的。支持原则是: 1.两个tensor都至少有一维 2.从最后一维开始,要么其中一个tensor的维数等于1,要么两个维数相同。 CUDA语法 pytorch可以通过一行代码实现数据在GPU和CPU之间的切换,并且在网络训练过程中,你可以随时将数据从GPU中拿出来进行操

2017-11-01 10:49:44 1291

原创 pytorch学习笔记(一) autograd

学了大概一个月时间的pytorch和tensorflow,觉得pytorch写法比tf更简单,也更灵活。不需要通过session来run到结果,数据可以轻松地在cpu和gpu之间切换。 pytorch的一个最重要的机制就是autograd机制,通过这个机制你可以轻易的固定你的模型的部分参数,从而在训练中只是训练你希望训练的那部分计算图。 在pytorch中有两个类型的变量,一个是tensor,

2017-10-31 10:59:02 2489

原创 TensorFlow Windows安装文档翻译

这篇文章将引导你在Windows上安装TensorFlow。

2017-09-14 11:44:28 352

原创 windows10 64bit + Anaconda + python3.5 安装xgboost的一种简单方法

xgboost连着装了两个晚上,都没有成功,很崩 = = 。。。 后来在offcial guide上找到一个很简单的方法,现在将其记录如下: 需要的材料: 1.Anaconda 2.Git 3.一个网址:http://www.picnet.com.au/blogs/guido/post/2016/09/22/xgboost-windows-x64-binaries-for-dow

2017-05-23 12:07:11 3365 2

原创 LeetCode417

Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top edges of the matrix and the "Atlantic ocean" tou

2017-04-17 11:22:57 516

原创 LeetCode回溯问题合集(general solution)

全排列问题,子集问题,组合和问题都是经典的回溯问题。 对于子集问题,若无重复元素情况下,可以有下面的通用解法,这个解法的关键在于:第一层递归,得出单个元素集合,第二层递归得到两个元素集合,以此类推。 public List> subsets(int[] nums) { List> list = new ArrayList<>(); Arrays.sort(nums);

2017-03-18 22:49:55 1256 1

原创 LeetCode315

You are given an integer array nums and you have to return a new counts array. The counts array has the property where counts[i] is the number of smaller elements to the right of nums[i]. Example

2017-03-13 14:38:15 711

原创 LeetCode331

One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, we record using a sentinel value such as #.

2017-03-09 15:41:27 698

原创 一道传说中的阿里面试题

前天在群里得知了一道阿里面试题,因为是别人口述,所以细节并不完整。 题目大意是这样的,有一个数组,去掉其中三个数,使数组剩下的四个部分和相等,且时间复杂度为O(n)。 想了很久如何使用一个循环来调度三个指针,因为在移动前两个指针的过程中,后一个指针亦必须作出反应,情况太多也太复杂。 今天想到一个方法,即在数组非负的情况下,采取从两头往中间挤压的方法可以定出前后两个区间,这时候中间部分就转变成

2017-03-05 21:58:28 721

原创 LeetCode129(以及JAVA函数变量传递问题)

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find the tota

2017-02-11 12:13:34 488

原创 Ubuntu升级后只能进入grub界面的解决方法

程序拷出来后我又不想重装系统和重新配置环境,毕竟自己也没做错什么啊哭,于是四处百度寻求解决方法。 在一番搜寻后,我总结出来要想搞出以前的引导菜单,关键在normal.mod这个文件上! 那就先看看这个文件还在不在吧,万幸的是它乖乖地躺在/boot/grub/x86_64-efi/这个文件夹下面~ 长舒一口气,看来只需要一番操作就能将系统带回来了! 下面是具体步骤: 1.在grub>这个命

2017-01-14 14:48:09 9586 3

原创 LeetCode 11

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin

2017-01-12 22:29:59 397

原创 LeetCode 289

这道题目其实并不难,但是我在其他地方看来的一个做法却很有意思。 中心思想是使用数字的高位来存储下一次的状态,用低位来存储当前的状态,这样就可以做到在原来的位置上同时存在当前的状态和下一次的状态,在全部扫描过后,将所有状态整体右移一位即可。 下边是java代码的实现 public class Solution { public void gameOfLife(int[][] b

2017-01-11 22:27:39 491

原创 北京雾霾数据分析

2016年北京雾霾数据初步分析 最近拿到了美国人收集的北京PM2.5指数数据,数据是从2008年到2016年每小时的pm2.5浓度值。这学期零零散散学习了一些python下pandas的数据分析,正好可以用来试试手,试着分析一下雾霾数据,在试着做做预测。 首先,先将数据怼进来,然后做一下简单处理,除去异常值(小于0)的数值。 import pandas as pd DataSet2016

2017-01-10 19:39:13 5578 2

原创 LeetCode78

这道题比较简单~一次就AC了~ 但是我觉得求求集合子集的算法是一个很重要的子算法,还是在这里记录一下自己的思路。 Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For

2017-01-05 23:46:59 363

转载 LeetCode75

转自http://www.cnblogs.com/ganganloveu/p/3703746.html Sort Colors   Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the

2017-01-05 10:51:29 326

空空如也

空空如也

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

TA关注的人

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