自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(142)
  • 资源 (5)
  • 收藏
  • 关注

转载 tf.get_variable tf.variable_scope tf.name_scope

http://blog.csdn.net/u012436149/article/details/53081454http://www.cnblogs.com/Charles-Wan/p/6200446.html1\tf.get_variable, tf.variable_scopetf.get_variable 和tf.Variable不同的一点是,前者拥有一个变量检查

2017-05-04 21:31:26 422

原创 caffe cudnn permission denied

caffe :make caffe -j : cudnn.h permission deniedsolution:linux 如何将---x-----x权限修改成-rw-r--r--(求命令)chmod 644 cudnn.h

2016-08-10 22:20:32 1167

原创 caffe + anaconda2 重新编译后出现问题

1、/usr/lib/x86_64-linux-gnu/libunwind.so.8: undefined reference to `lzma_index_size@XZ_5.0在~/.bashrc的末尾加上,然后重启(source ~/.bashrc).export LD_LIBRARY_PATH=”/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH”2、/usr/bi

2016-07-23 11:41:53 3011

转载 Anaconda 镜像

Anaconda 镜像使用帮助Anaconda 是一个用于科学计算的 Python 发行版,支持 Linux, Mac, Windows, 包含了众多流行的科学计算、数据分析的 Python 包。Anaconda 安装包可以到 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 下载。TUNA 还提供了 Anaconda 仓

2016-07-17 13:17:24 2971

原创 Tensorflow: recurrent neural network char-level 1

import numpy as npimport tensorflow as tfimport matplotlib.pyplot as pltfrom tensorflow.models.rnn import rnn, rnn_cellfrom tensorflow.models.rnn import seq2seqimport collections# @karpathydata =

2016-07-05 17:59:27 1082 2

原创 Tensorflow: recurrent neural network char-level 0

import numpy as npimport tensorflow as tfimport matplotlib.pyplot as pltfrom tensorflow.models.rnn import rnn, rnn_cellfrom tensorflow.models.rnn import seq2seqimport collections# @karpathydata =

2016-07-05 14:28:32 547

原创 Tensorflow: RNN/LSTM gradient clipping

lr = 0.01max_grad_norm = 5tvars = tf.trainable_variables()grads, _ = tf.clip_by_global_norm(tf.gradients(loss, tvars), max_grad_norm)opt = tf.train.GradientDescentOptimizer(lr)# opt = tf.train.Adam

2016-07-04 22:53:11 3537

原创 Tensorflow: recurrent neural network (mnist basic)

import numpy as npimport tensorflow as tfimport matplotlib.pyplot as pltfrom tensorflow.examples.tutorials.mnist import input_datafrom tensorflow.models.rnn import rnn, rnn_cellmnist = input_data.r

2016-07-04 22:40:38 726

原创 Tensorflow: Convolutional Neural Network Basic

import numpy as npimport tensorflow as tfimport matplotlib.pyplot as pltfrom tensorflow.examples.tutorials.mnist import input_datafrom tensorflow.python.training.training_util import global_stephid

2016-06-30 21:17:07 910

原创 Tensorflow: Deep Multi-Layer Pecptron with Xavier Initializer

Xavier initializerhttps://github.com/google/prettytensor/blob/a69f13998258165d6682a47a931108d974bab05e/prettytensor/layers.pyimport numpy as npimport tensorflow as tfimport matplotlib.pyplot as pltf

2016-06-30 19:08:04 896

原创 Tensorflow: Deep Multi-Layer Pecptron Mnist

import numpy as npimport tensorflow as tfimport matplotlib.pyplot as pltfrom tensorflow.examples.tutorials.mnist import input_datahidden_layer_size = [256]*4input_layer_size = 784output_layer_size

2016-06-30 18:06:53 376

原创 Tensorflow: Logistic Regression Mnist

import numpy as npimport osimport matplotlib.pyplot as pltimport pprint# from sklearn.datasets import load_bostonimport tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_datam

2016-06-30 15:13:15 1297

原创 Tensorflow: Linear Regression

toy datasetimport numpy as npimport osfrom scipy.misc import imread, imresizeimport matplotlib.pyplot as pltimport pprintfrom sklearn.datasets import load_bostondef toy_dataset(n): w, b = 0.7,

2016-06-28 22:57:58 471

原创 Tensorflow : Basic Dataset generation

import numpy as npimport osfrom scipy.misc import imread, imresizeimport matplotlib.pyplot as pltimport pprintcwd = os.getcwd()#################################################################def

2016-06-28 21:50:29 1121

原创 Tensorflow Image Processing Basic 2: Load Images from folder

import numpy as npimport osfrom scipy.misc import imread, imresizeimport matplotlib.pyplot as pltimport pprintcwd = os.getcwd()def load_img_from_folder(path): valid_exts = ['.jpg', '.png', '.jp

2016-06-28 20:57:18 712

原创 Tensorflow Image Processing Basic

import numpy as npimport osfrom scipy.misc import imread, imresizeimport matplotlib.pyplot as pltcwd = os.getcwd()def print_typeshape(img): print "type is %s" % type(img) print "shape is %s"

2016-06-28 20:39:38 592

原创 Tensorflow mnist basic

import numpy as npimport tensorflow as tfimport matplotlib.pyplot as pltfrom tensorflow.examples.tutorials.mnist import input_datafrom tensorflow.contrib.learn.python.learn.datasets import mnistfro

2016-06-28 20:02:53 467

原创 TensorFlow Basic

Constantimport numpy as npimport tensorflow as tfsess = tf.Session()str = tf.constant("this is a string")str_out = sess.run(str)print str# <tf.Tensor 'Const_3:0' shape=() dtype=string>print str_out

2016-06-28 16:08:04 439

转载 Product of Array Except Self

c++class Solution {public: vector<int> productExceptSelf(vector<int>& nums) { int n = nums.size(); vector<int> res(n, 1); int left = 1, right = 1; for (int i = 0, j

2016-06-21 23:28:21 281

转载 Search a 2D Matrix II

c++class Solution {public: bool searchMatrix(vector<vector<int>>& matrix, int target) { if (matrix.empty()) return false; if (target < matrix[0][0] || target > matrix.back().back()

2016-06-21 23:07:02 229

原创 Different Ways to Add Parentheses

c++class Solution {public: vector<int> diffWaysToCompute(string input) { if (cache.find(input) != cache.end()) return cache[input]; vector<int> res; for (int i

2016-06-21 22:38:48 230

转载 Single Number III

c++class Solution {public: vector<int> singleNumber(vector<int>& nums) { int xor_val = 0; for (auto &v : nums) { xor_val ^= v; } int bit = xor_val & ~(x

2016-06-21 22:03:21 212

原创 Ugly Number II

c++class Solution {public: int nthUglyNumber(int n) { if (n == 1) return 1; vector<int> idx(9, 0); vector<int> ugly(n, INT_MAX); ugly[0] = 1; for (int i = 1

2016-06-21 21:31:20 220

原创 Missing Number

c++class Solution {public: int missingNumber(vector<int>& nums) { int res = 0; for (auto &v : nums) res ^= v; for (int i = 0; i <= nums.size(); ++i)

2016-06-21 21:05:32 260

原创 H-Index II

c++class Solution {public: int hIndex(vector<int>& citations) { if (citations.empty()) return 0; //sort(citations.begin(), citations.end()); int n = citations.size();

2016-06-21 20:58:52 238

原创 H-Index

c++bool comp(const int &a, const int &b){ return a>b;}class Solution {public: int hIndex(vector<int>& citations) { if (citations.empty()) return 0; sort(citations.begin(), cit

2016-06-21 20:42:12 270

原创 Perfect Squares

c++class Solution {public: int numSquares(int n) { if (n < 1) return 0; vector<int> cache(n+1, INT_MAX); cache[1] = 1; for (int i = 2; i <= n; ++i) { fo

2016-06-21 20:12:12 219

转载 Peeking Iterator

c++// Below is the interface for Iterator, which is already defined for you.// **DO NOT** modify the interface for Iterator.class Iterator { struct Data; Data* data;public: Iterator(cons

2016-06-21 16:35:26 225

转载 Game of Life

c++class Solution {public: void gameOfLife(vector<vector<int>>& board) { if (board.empty()) return; int m = board.size(); int n = board[0].size(); for (int i = 0; i

2016-06-21 16:07:35 215

原创 Longest Increasing Subsequence

c++class Solution {public: int lengthOfLIS(vector<int>& nums) { if (nums.empty()) return 0; vector<int> cache(nums.size(),1); int max_len = 1; for (int i = 1; i < n

2016-06-21 15:05:05 205

原创 Range Sum Query 2D - Immutable

c++class NumMatrix {public: NumMatrix(vector<vector<int>> &matrix) { if (matrix.empty()) return; cum = matrix; for (int i = 0; i < cum.size(); ++i) {

2016-06-21 12:35:50 158

转载 Additive Number

c++class Solution {public: bool isAdditiveNumber(string num) { if (num.size() < 3) return false; for (int i = 1; i <= num.size() / 2; ++i) { for (int j = 1; j <= (num.si

2016-06-21 10:55:59 182

原创 Range Sum Query - Mutable

c++class NumArray {public: NumArray(vector<int> &nums) { nums_bk = nums; int sum_val = 0; cums.push_back(0); for (auto &v : nums) { sum_val += v;

2016-06-17 23:35:36 223

原创 Odd Even Linked List

c++/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode*

2016-06-17 23:13:54 175

原创 Best Time to Buy and Sell Stock with Cooldown

c++class Solution {public: int maxProfit(vector<int>& prices) { if (prices.empty()) return 0; int pre_buy = -prices[0]; int pre_sell = INT_MIN; int pre_rest = 0;

2016-06-17 22:38:07 159

原创 Minimum Height Trees

c++class Solution {public: vector<int> findMinHeightTrees(int n, vector<pair<int, int>>& edges) { if (n == 1) return vector<int>(1,0); unordered_map<int, unordered_set<int>> graph;

2016-06-17 21:40:08 180

转载 Super Ugly Number

c++class Solution {public: int nthSuperUglyNumber(int n, vector<int>& primes) { vector<int> idx(primes.size(), 0); vector<int> ugly(n); ugly[0] = 1; for (int i = 1;

2016-06-17 16:34:48 156

转载 Maximum Product of Word Lengths

c++class Solution {public: int maxProduct(vector<string>& words) { if (words.empty()) return 0; int len = words.size(); vector<int> mask(len, 0); //binary mask

2016-06-17 15:12:04 182

转载 Bulb Switcher

c++class Solution {public: int bulbSwitch(int n) { return sqrt(n); }};pythonclass Solution(object): def bulbSwitch(self, n): """ :type n: int :rtype: int

2016-06-17 14:37:36 203

原创 Coin Change

c++:Dynamic Programmingclass Solution {public: int coinChange(vector<int>& coins, int amount) { if (amount == 0) return 0; if (dict.find(amount) != dict.end()) { return

2016-06-16 20:07:22 264

matio-1.5.10

matio pspnet 编译的时候需要安装 matio pspnet matio pspnet

2018-08-09

opencv-3.4.2 官方源码

opencv-3.4.2 官方源码 opencv-3.4.2 官方源码 opencv-3.4.2 官方源码

2018-08-09

course slam

slam course slam, course slam course slam course slam

2018-08-09

Local Accuracy and Global Consistency for Efficient Visual SLAM

Local Accuracy and Global Consistency for Efficient Visual SLAM

2018-07-11

Gradient Boosting Decision Tree

Gradient Boosting Decision Tree

2015-10-30

空空如也

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

TA关注的人

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