自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 [LeetCode 解题报告]041. First Missing Positive

Given an unsorted integer array, find the smallest missingpositive integer.Example 1:Input: [1,2,0]Output: 3Example 2:Input: [3,4,-1,1]Output: 2Example 3:Input: [7,8,9,11,12]Outpu...

2019-10-30 23:40:26 72

原创 【darknet源码解析-18】convolutional_layer.h 和 convolutional_layer 解析

本系列为darknet源码解析,本次解析为src/convolutional_layer.h 和 src/convolutional_layer.c 两个,convolutional_layer主要是构建卷积层。卷积前向传播卷积操作如下图所示:在这里batch=1,输入图片h*w为5*5,通道数c为3;卷积模板数n为2,卷积核大小size为3*3,卷积步幅stride为1,补零个数pad为1...

2019-10-30 23:38:10 2349 3

原创 [LeetCode 解题报告]040. Combination Sum II

Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations incandidateswhere the candidate numbers sums totarget.Each number incandidatesmay...

2019-10-29 23:09:30 63

原创 [LeetCode 解题报告]039. Combination Sum

Given asetof candidate numbers (candidates)(without duplicates)and a target number (target), find all unique combinations incandidateswhere the candidate numbers sums totarget.Thesamerepeat...

2019-10-29 22:58:16 112

原创 [LeetCode 解题报告]038. Count and Say

The count-and-say sequence is the sequence of integers with the first five terms as following:1. 12. 113. 214. 12115. 1112211is read off as"one 1"or11.11is read off ...

2019-10-29 22:43:28 69

原创 [LeetCode 解题报告]037. Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells.Asudoku solution must satisfyall ofthe following rules:Each of the digits1-9must occur exactlyonce in each row. Each of t...

2019-10-29 22:20:36 107

原创 【darknet源码解析-17】detection_layer.h 和 detection_layer.c 解析

本系列为darknet源码解析,本次解析src/detection_layer.h 与 src/detection_layer.c 两个。detection_layer主要完成了yolo v1最后一层7*7*30,是yolo v1这篇论文的核心部分。detection_layer.h 的定义如下:#ifndef DETECTION_LAYER_H#define DETECTION_LA...

2019-10-29 13:45:43 1406

原创 【darknet源码解析-16】logistic_layer.h 和 logistic_layer.c 解析

本系列为darknet源码解析,本次解析src/logistic_layer.h 与 src/logistic_layer.c 两个。logistic_layer主要完成了逻辑回归。在这里,我们推导一下梯度反传,详细请参看李航 《统计学习方法》一书。设: 似然函数为:对数似然函数为:对求极大值,就得到的估计值。将其前边添加负号,变为求极小值,就是我们的代价函数求极小值,则乘...

2019-10-28 15:37:14 500

原创 [LeetCode 解题报告]036. Valid Sudoku

Determine if a9x9 Sudoku boardis valid.Only the filled cells need to be validatedaccording to the following rules:Each rowmust contain thedigits1-9without repetition. Each column must conta...

2019-10-27 23:08:07 94

原创 [LeetCode 解题报告]035. Search Insert Position

Given 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 no duplicates in the array....

2019-10-27 22:56:45 79

原创 [LeetCode 解题报告]034. Find First and Last Position of Element in Sorted Array

Given an array of integersnumssorted in ascending order, find the starting and ending position of a giventargetvalue.Your algorithm's runtime complexity must be in the order ofO(logn).If the...

2019-10-27 22:47:33 98

原创 [LeetCode 解题报告]033. Search 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]).You are given a target value to search. If found ...

2019-10-27 21:54:05 95

原创 [LeetCode 解题报告]032. Longest Valid Parentheses

Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.Example 1:Input: "(()"Output: 2Explanation: The longest valid...

2019-10-27 20:22:50 94

原创 [LeetCode 解题报告]031. Next Permutation

Implementnext permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible o...

2019-10-27 15:45:35 97

原创 [LeetCode 解题报告]030. Substring with Concatenation of All Words

You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatenation of each word inwordsexactly once and wi...

2019-10-27 15:12:49 120

原创 [LeetCode 解题报告]029. Divide Two Integers

Given two integersdividendanddivisor, divide two integers without using multiplication, division and mod operator.Return the quotient after dividingdividendbydivisor.The integer division sho...

2019-10-26 23:36:47 88

原创 [LeetCode 解题报告]028. Implement strStr()

ImplementstrStr().Return the index of the first occurrence of needle in haystack, or-1if needle is not part of haystack.Example 1:Input: haystack = "hello", needle = "ll"Output: 2Example...

2019-10-26 23:11:07 113

原创 [LeetCode 解题报告]027. Remove Element

Given an arraynumsand a valueval, remove all instances of that valuein-placeand return the new length.Do not allocate extra space for another array, you must do this bymodifying the input arra...

2019-10-26 23:04:46 78

原创 [LeetCode 解题报告]026. Remove Duplicates from Sorted Array

Given a sorted arraynums, remove the duplicatesin-placesuch that each element appear onlyonceand return the new length.Do not allocate extra space for another array, you must do this bymodifyi...

2019-10-26 23:01:06 70

原创 [LeetCode 解题报告]025. Reverse Nodes in k-Group

Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.kis a positive integer and is less than or equal to the length of the linked list. If the number of ...

2019-10-26 22:36:33 122

原创 [LeetCode 解题报告]206. Reverse Linked List

Reverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULLFollow up:A linked list can be reversed either iteratively or recursi...

2019-10-26 22:34:15 84

原创 [LeetCode 解题报告]024. Swap Nodes in Pairs

Given alinked list, swap every two adjacent nodes and return its head.You maynotmodify the values in the list's nodes, only nodes itself may be changed.Example:Given 1->2->3->4, ...

2019-10-26 17:08:23 69

原创 [LeetCode 解题报告]023. Merge k Sorted Lists

Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.Example:Input:[ 1->4->5, 1->3->4, 2->6]Output: 1->1->2->3->4-...

2019-10-26 16:31:36 93

原创 [LeetCode 解题报告]022. Generate Parentheses

Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:[ "((()))", "(()())", "(())()", "()(())"...

2019-10-26 16:18:05 86

原创 [LeetCode 解题报告]021. Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1->3->4Output: 1-...

2019-10-26 16:00:12 125

原创 [LeetCode 解题报告]020.Valid Parentheses

Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type of b...

2019-10-24 22:30:40 110

原创 [LeetCode 解题报告]019.Remove Nth Node From End of List

Given a linked list, remove then-th node from the end of list and return its head.Example:Given linked list: 1->2->3->4->5, and n = 2.After removing the second node from the end, t...

2019-10-24 22:09:49 91

原创 【darknet源码解析-15】maxpool_layer.h 和 maxpool_layer.c 解析

本系列为darknet源码解析,本次解析src/maxpool_layer.h 与 src/maxpool_layer.c 两个。avgpool_pool主要完成了最大池化操作。maxpool_layer.h 的解析如下:#ifndef MAXPOOL_LAYER_H#define MAXPOOL_LAYER_H#include "image.h"#include "cud...

2019-10-21 20:17:49 794

原创 【darknet源码解析-14】avgpool_layer.h 和 avgpool_layer.c 解析

本系列为darknet源码解析,本次解析src/avgpool_layer.h 与 src/avgpool_layer.c 两个。avgpool_pool主要完成了平均池化操作。avgpool_layer.h 的解析如下:#ifndef AVGPOOL_LAYER_H#define AVGPOOL_LAYER_H#include "image.h"#include "cud...

2019-10-21 20:17:40 763 2

原创 【darknet源码解析-13】activation_layer.h 和 activation_layer.c 解析

本系列为darknet源码解析,本次解析src/activation_layer.h 和 src/activation_layer.c 两个,activation_layer 主要用于构建激活函数层,完成激活函数的前向,梯度反向传播。关于激活函数的一层底层实现,请先阅读【darknet源码解析-07】activations.h 和 activations.c 解析。activation_l...

2019-10-21 20:17:33 837

原创 【darknet源码解析-12】connected_layer.h 和 connected_layer.c 解析

本系列为darknet源码解析,本次解析为src/connect_layer.h 和 src/connect_layer.c 两个,connect_layer主要是构建全连接网络。在阅读本文之前请事先手推一遍BP算法,这样有助于你对connect_layer源码的理解。主要理解BP算法对隐藏层权重和偏置如何求偏导数,以及最输出层求偏导数。注意:在全连接网络中的添加BN操作,W×X之后,...

2019-10-20 18:28:25 742

原创 【darknet源码解析-11】batchnorm_layer.h 和 batchnorm_layer.c解析

本系列为darknet源码解析,本次解析src/batchnorm_layer.h 与 src/batchnorm_layer.c两个。batchnorm主要完成批归一化操作。论文名字:Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift论文地址:https:...

2019-10-20 18:01:18 1012

原创 【darknet源码解析-10】dropout.h 和 dropout.c 解析

本系列为darknet源码解析,本次解析src/dropout.h 与 src/dropout.c 两个。在神经网络中应用dropout包括训练和预测两个阶段,在训练阶段,dropout 以一定的概率p随机的"舍弃"一部分神经元点,即这部分神经元节点暂时停止工作,如下图所示。因此,对于一个包含N个节点的神经,在dropout的作用下可看作2^N个模型的集成。这2^N个模型可以看成原始网络的子网...

2019-10-19 17:55:54 546

原创 【darknet源码解析-09】col2im.h 和 col2im.c 解析

本系列为darknet源码解析, 本次解析src/col2im.h 与 src/col2im_cpu.c 两个. 这两个其实与之前所解析src/im2col.h 和 src/im2col.c的逆过程, col2im就是将im2col重排的图片data_col恢复到正常的图像矩阵排列。col2img.h 中包含的代码如下:主要就是一个函数col2im.h定义,在这里我们也不涉及到gpu那块,先讲...

2019-10-18 21:59:10 2090 2

原创 【darknet源码解析-08】cost_layer.h 和 cost_layer.c 解析

本系列为darknet源码解析,本次解析src/cost_layer.h 与 src/cost_layer.c 两个。在本文中,cost主要完成多种损失函数的前向计算以及损失损失函数反向传播。COST_TYPE定义在include/darknet.h中,是枚举类型. 可以发现darknet提供了六种损失函数.typedef enum{ SSE, MASKED, L1, SEG, ...

2019-10-18 10:37:34 1049

空空如也

空空如也

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

TA关注的人

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