自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Resnet

1. 梯度消失 & 梯度爆炸 假设有: 表达式为: 对W1求梯度,由链式法则有: 若采用sigmod激活函数,其导数为: 可以看出,导数不超过0.25,若W1,W...

2019-03-15 21:37:30 354

原创 CNN 基础知识

1. 神经元 VS feature map VS 卷积核    神经元:feature map 的大小    feature map:输入图像经过卷积核卷积后的各像素点的组合    卷积核: 属于共享参数   2. 权值共享    权值共享:同一个feature map中神经元使用同一个权值,可训练参数只与卷积核大小、个数、通道有关   3. 感受野 and 计算量    计算量...

2019-02-23 20:15:01 417

原创 Scikit-Learn

#Step 1 from sklearn.datasets import make_classification datas = make_classification( n_samples = 1000, n_features=10 , ) #Step 2 from sklearn import cross_validation kf = cross_validation.KFold( len...

2018-07-06 00:13:10 285

原创 Pandas

For each of the four datasets...Compute the mean and variance of both x and yCompute the correlation coefficient between x and yCompute the linear regression line:  (hint: use statsmodels and look at ...

2018-07-05 21:26:43 200

原创 Scipy

#10.1 import numpy as np import scipy.optimize as opt m = 20 n = 10 A = np.random.normal(loc=10, scale=3 , size=(m,n)) b = np.random.normal(size=m) ans = opt.lsq_linear(A, b) x = ans['x'] residual ...

2018-07-05 20:39:55 597

原创 (补)Matplotlib

#11.1 import numpy as np#11.2 import matplotlib matplotlib.use("TKAgg") import matplotlib.pyplot as plt import numpy as np X = [] for i in range(10): x = 10*np.random.random() X.append(np.ran...

2018-07-04 11:26:30 189

原创 (补)Numpy

import numpy as np from scipy.linalg import toeplitz from scipy.linalg import svdvals import time n , m = 200, 500 A = np.random.normal(size=[n,m]) B = toeplitz(range(m)) #9.1 AA = A+A AAT = np.dot(...

2018-07-04 10:59:11 180

原创 LeetCode

6. Z字形变换【中】将字符串 "PAYPALISHIRING" 以Z字形排列成给定的行数:示例:P A H N A P L S I I G Y I R之后从左往右,逐行读取字符:"PAHNAPLSIIGYIR"代码:(找规律) def convert(self, s, numRows): """ :type s: str ...

2018-06-17 23:58:05 159

原创 LeetCode

  暂略

2018-05-07 00:11:32 209

原创 LeetCode

15. 三数之和给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复的三元组。注意:答案中不可以包含重复的三元组Note: The solution set must not contain duplicate triplets.For example, given array S = [-1, 0...

2018-04-30 17:39:00 353

原创 Python编程 从入门到实践 第十一章习题

11-1 城市和国家import unittest from city_funtions import get_city_country class NameTestCase(unittest.TestCase): def test_city_country(self): formatted_name = get_city_country('santiago','chi...

2018-04-15 16:39:22 435 1

原创 Python编程 从入门到实践 第十章习题

10-1 Python学习笔记filename = 'learning_python.txt' print("读取整个文件:") with open(filename) as file_object: contents = file_object.read() print(contents) print("\n遍历文件对象:") with open(filename) as fi...

2018-04-08 23:02:49 317

原创 Python编程 从入门到实践 第九章习题

9-1 餐馆class Restaurant(): def __init__(self, restaurant_name, cuisine_type): self.name = restaurant_name self.type = cuisine_type def describe_restaurant(self): print...

2018-04-08 13:56:58 220

原创 Python编程 从入门到实践 第八章习题

8-2 喜欢的图书:def favorite_book(title): """"喜欢的图书""" print("One of my favorite book is " + title.title() + ".") favorite_book("Harry Potter")输出:One of my favorite book is Harry Potter.8-

2018-03-31 21:56:12 550

原创 Python编程 从入门到实践 第七章习题

7-2 餐馆订位:number = input("How many of you are there for dinner?") number = int(number) if number > 8: print("There is no empty table。") else: print("The table is available.")输出:How many of ...

2018-03-27 11:07:43 248

原创 Python编程 从入门到实践 第六章习题

6-2 喜欢的数字:favorite_number = { 'alex' : 29, 'leo' : 23, 'mike' : 45, 'John' : 100, 'Phil' : 34, } 输出:Alex's favorite number is 29. Leo's favorite number is 23. Mike's favorite numb...

2018-03-23 14:43:47 336

原创 Python编程 从入门到实践 第五章习题

5-4 外星人的颜色#2:alien_color = 'green' #version 1, 执行if语句 #alien_color = 'yellow' #version 2, 执行else语句 if alien_color == 'green': print("You have win 5 scores!") else: print("You have win 10 ...

2018-03-19 13:19:39 415

原创 Python编程 从入门到实践 第四章习题

4-1: 比萨 pizzas = ['seafood' , 'beef', 'cheese'] for pizza in pizzas: print('I like ' + pizza + ' pizza.') print('I really like pizza!')输出:I like seafood pizza. I like beef pizza. I like cheese piz...

2018-03-18 15:35:26 349

原创 Python编程 从入门到实践 第三章习题

3-1 姓名>>> name = ['Alex', 'Leo', 'Mike'] >>> print(name[0]) Alex >>> print(name[1]) Leo >>> print(name[2]) Mike3-2 问候语>>> message = 'Hello, '+name[0] +

2018-03-12 22:06:47 296

原创 Python编程 从入门到实践 第一章习题

1.浏览Python主页,写下发现和收获。    打开Python主页,页面简洁,可供进入的页面有关于、下载、文件、社区、成功案例、新闻、活动。    当我听说Python这一词时,很多时候都是与爬虫联系在一起。当我打开Python网页时,我才发现爬虫不过是Python初露头角的入门练习,在艺术,商业,教育,工程,政府,科学,软件开发这些几乎涵盖了现代生活方方面面的领域,都展现了作为编程语言无与伦...

2018-03-08 14:50:31 749

原创 Python编程 从入门到实践 第二章习题

2-1 简单消息:>>> message = 'simple_message' >>> print(message) simple_message2-2 多条简单消息:>>> message = 'simple_message' >>> print(message) simple_message >>&gt

2018-03-08 00:18:37 265

空空如也

空空如也

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

TA关注的人

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