caffe_batchnormal bn层和scale层要一起使用,原因:batchnormal做了两件事。1) 输入归一化 x_norm = (x-u)/std, 其中u和std是个累计计算的均值和方差。2)y=alpha×x_norm + beta,对归一化后的x进行比例缩放和位移。其中alpha和beta是通过迭代学习的。那么caffe中的bn层其实只做了第一件事。scale层做了第二件事。
opencl_1 在使用OpenCL API之前,和绝大部份所有其它的API一样,都需要include相关的header档案。由于在MacOS X 10.6下OpenCL的header档案命名方式和在其它作业系统下不同,因此,通常要使用一个#ifdef来进行区分。如下所示:#ifdef __APPLE__#include #else#include #endif这样就
第八章课后题_1 8.3STINGY SAT的解是属于NP的,是可以在多项式时间内验证的。此外,SAT问题将k设为所有变量的总个数就可以规约到STINGY SAT。所以STINGY SAT是NP完全问题。8.8首先EXACT 4SAT属于NP。其次,对于3SAT实例,如果其中的某个子句中多次包含了同一个文字,就可以缩减为1次。如果包含一个变量的否定或肯定,可以去掉这个变量。这样就能把3SAT实例
leetcode_107. Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree [3,9,20,null,null,15,
leetcode_ Add to List 121. Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), d
leetcode_ Add to List 108. 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 a binary tree node.
leetcode_110. 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 ne
leetcode_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 sum
leetcode_sicily 做了几道模拟题。第一道,递归。简单,不必多说。直接贴代码:int F(int k, int n) { int m = 0; if(k == 0){ return n; } else{ for(int i = 0; i <= n; ++i){ m+=F(k-1,i); } return m; }}
leetcode_153. Find Minimum in Rotated Sorted Array 题目:Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no d
leetcode_162. Find Peak Element 题目:A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks,
leetcode_96. Unique Binary Search Trees 题目:Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1
leetcode_72. Edit Distance 题目:Given two words word1 and word2, find the minimum number of steps required to convertword1 to word2. (each operation is counted as 1 step.)You have the following 3 operations permitted on a
leetcode_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
leetcode_64. Minimum Path Sum 题目:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right whichminimizes the sum of all numbers along its path.跟上次的题目很像,就是多了权值条件而已。那就每个位置等于上面或者左面加自己,上面或者左
leetcode_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 r
残差网络 http://www.cnblogs.com/Charles-Wan/p/6535395.htmlhttp://www.cnblogs.com/Charles-Wan/p/6660077.html
leetcode_120. Triangle 题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[ [2], [3
leetcode_304. Range Sum Query 2D - Immutable 题目:Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1,col1) and lower right corner (row2, col2).The above rectangle (with the