12 2018 档案

摘要:Part I: Preparation 略 Part II:Barebone TensorFlow 首先实现一个flatten函数: 完成一个两层的全连接网络并测试: 完成一个3层的卷积网络并测试: 网络结构如下: 1. A convolutional layer (with bias) with 阅读全文
posted @ 2018-12-29 22:31 bernieloveslife 阅读(3711) 评论(0) 推荐(0)
摘要:终于来到了卷积网络 首先完成最基本的前向传播: Testing conv_forward_naive difference: 2.2121476417505994e 08 一个有趣的测试,通过我们实现的卷积层处理图片,得到其边缘信息。 完成基本的后向传播: Testing conv_backward 阅读全文
posted @ 2018-12-28 22:47 bernieloveslife 阅读(3787) 评论(0) 推荐(0)
摘要:Dropout see "Geoffrey E. Hinton et al, "Improving neural networks by preventing co adaptation of feature detectors", arXiv 2012" 完成前向传播 def dropout_fo 阅读全文
posted @ 2018-12-28 15:17 bernieloveslife 阅读(1201) 评论(0) 推荐(0)
摘要:有句话叫“懂得了很多道理,依然过不好这一生。”用在这道题里很合适“懂得了每个过程的原理,依然写不好这代码。” 但抄完之后还是颇有收获的。 1、完成放射变换前向传播,f = wx + b Testing affine_forward function: difference: 9.7698494681 阅读全文
posted @ 2018-12-28 11:32 bernieloveslife 阅读(4395) 评论(0) 推荐(0)
摘要:batch normlization see [Sergey Ioffe and Christian Szegedy, "Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Sh 阅读全文
posted @ 2018-12-28 11:12 bernieloveslife 阅读(3840) 评论(0) 推荐(0)
摘要:这个作业是讨论对图像像素进行进一步计算得到的特征来训练线性分类器是否可以提高性能。 对于每张图,我们会计算梯度方向直方图(HOG)特征和用HSV(Hue色调,Saturation饱和度,Value明度)颜色空间的色调特征。把每张图的梯度方向直方图和颜色直方图特征合并形成我们最后的特征向量。 HOG大 阅读全文
posted @ 2018-12-26 16:24 bernieloveslife 阅读(762) 评论(0) 推荐(0)
摘要:网络设置: 两层的神经网络,第一层激活函数为Relu,第二层用softmax输出分类概率。使用随机梯度下降来训练。 neural_net.py from __future__ import print_function import numpy as np import matplotlib.pyp 阅读全文
posted @ 2018-12-26 15:42 bernieloveslife 阅读(3636) 评论(0) 推荐(0)
摘要:Softmax简介: Softmax分类器也叫多项Logistic回归(Multinomial Logistic Regression)。 对公式的理解:首先将一个负数x通过指数变成整数,求它的概率分布也就是每部分除以总和。 损失函数 即交叉熵损失函数(cross entroy) softmax.p 阅读全文
posted @ 2018-12-26 14:34 bernieloveslife 阅读(719) 评论(0) 推荐(0)
摘要:SVM介绍 linear_svm.py linear_classifier.py 使用随机梯度下降来训练 from __future__ import print_function import numpy as np from cs231n.classifiers.linear_svm impor 阅读全文
posted @ 2018-12-26 14:09 bernieloveslife 阅读(1251) 评论(0) 推荐(0)
摘要:说来惭愧,这应该是很早以前就完成的任务了,但第一次做非常不认真,这次重刷一遍,记录如下。 knn还是很熟悉的,毕竟本科毕设就用过,但用numpy实现还是有些难度的。 knn部分 cross validation部分: Note 1. x.shape 没有括号 2. axis的用法 通过指定不同的ax 阅读全文
posted @ 2018-12-19 22:12 bernieloveslife 阅读(481) 评论(0) 推荐(0)
摘要:Given two arrays, write a function to compute their intersection. Example 1: Example 2: Note: Each element in the result should appear as many times a 阅读全文
posted @ 2018-12-03 21:20 bernieloveslife 阅读(138) 评论(0) 推荐(0)
摘要:Given a non empty integer array, find the minimum number of moves required to make all array elements equal, where a move is incrementing a selected e 阅读全文
posted @ 2018-12-03 17:10 bernieloveslife 阅读(124) 评论(0) 推荐(0)
摘要:There are two types of soup: type A and type B. Initially we have N ml of each type of soup. There are four kinds of operations: 1. Serve 100 ml of so 阅读全文
posted @ 2018-12-03 16:54 bernieloveslife 阅读(234) 评论(0) 推荐(0)
摘要:Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither. IPv4 addresses are canonically represented in do 阅读全文
posted @ 2018-12-03 14:20 bernieloveslife 阅读(196) 评论(0) 推荐(0)
摘要:Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2018-12-03 13:28 bernieloveslife 阅读(150) 评论(0) 推荐(0)
摘要:Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
posted @ 2018-12-03 12:41 bernieloveslife 阅读(166) 评论(0) 推荐(0)
摘要:目标是把这里的ppt什么的给下下来:https://web.stanford.edu/~jurafsky/slp3/ 阅读全文
posted @ 2018-12-01 22:06 bernieloveslife 阅读(114) 评论(0) 推荐(0)
摘要:目标是把这里的所有东西下载下来: http://ftp.sjtu.edu.cn/archlinux/core/os/x86_64/ 直接看代码吧,也没啥好说的。 阅读全文
posted @ 2018-12-01 22:03 bernieloveslife 阅读(118) 评论(0) 推荐(0)
摘要:Problem To celebrate the anniversary of Googleland, N couples are going to go for a boat ride in a rowboat. The rowboat is very long, but it is only o 阅读全文
posted @ 2018-12-01 22:00 bernieloveslife 阅读(442) 评论(0) 推荐(0)
摘要:Problem Thanh wants to paint a wonderful mural on a wall that is N sections long. Each section of the wall has a beauty score, which indicates how bea 阅读全文
posted @ 2018-12-01 21:51 bernieloveslife 阅读(551) 评论(0) 推荐(0)
摘要:Problem You are a contestant on a popular new game show and are playing for the grand prize! There are two big buttons, a red one and a black one. You 阅读全文
posted @ 2018-12-01 21:35 bernieloveslife 阅读(453) 评论(0) 推荐(0)
摘要:Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o 阅读全文
posted @ 2018-12-01 21:18 bernieloveslife 阅读(116) 评论(0) 推荐(0)
摘要:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by upd 阅读全文
posted @ 2018-12-01 20:55 bernieloveslife 阅读(196) 评论(0) 推荐(0)
摘要:Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: 阅读全文
posted @ 2018-12-01 19:10 bernieloveslife 阅读(346) 评论(0) 推荐(0)
摘要:Given a square array of integers A, we want the minimum sum of a falling path through A. A falling path starts at any element in the first row, and ch 阅读全文
posted @ 2018-12-01 15:56 bernieloveslife 阅读(152) 评论(0) 推荐(0)
摘要:In a string S of lowercase letters, these letters form consecutive groups of the same character. For example, a string like S = "abbxxxxzyy" has the g 阅读全文
posted @ 2018-12-01 14:55 bernieloveslife 阅读(158) 评论(0) 推荐(0)