- 博客(22)
- 收藏
- 关注
原创 A Compact Deep Learning Model for Robust Facial Expression Recognition 阅读笔记
1,论文主要贡献提出一种精简的CNN模型来协调在人脸表情识别任务中的“识别正确率”和“模型大小“。在两个标准的数据集上评估提出的网络模型,并展示相较于现阶段方法的优越性。收集了三个不同场景的数据集用于验证模型在多场景的性能。采用增强光照的方法来减轻用不同来源的图片训练模型时产生的过拟合问题。2,模型结构) b = np.random.randint(0,10,s...
2018-06-03 14:53:31
651
原创 matplotlib练习题
1. Plotting a function: 代码如下:import numpy as np import matplotlib.pyplot as pltx=np.arange(0,2,0.01)y=np.sin((x-2)*np.exp(-x**2))**2plt.plot(x,y)plt.xlabel('x label')plt.ylabel('y...
2018-05-26 20:31:14
1262
原创 Numpy作业
1. Matrix operations: Calculate A + A, AA>,A>A and AB. Write a function that computes A(B−λI) for any λ. 代码如下:import numpy as npA = np.random.randint(0,10,size=(2,5))B = np.random.r...
2018-05-20 11:38:33
486
原创 Leetcode : 11 Container With Most Water
题目如下:11. Container With Most WaterGiven n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i i...
2018-05-15 08:36:55
129
原创 Leetcode : 17 Letter Combinations of a Phone Number
题目如下:17. Letter Combinations of a Phone NumberGiven a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.A mapping of digit to letters...
2018-05-15 08:21:39
186
原创 Leetcode : 100 Same Tree
题目如下:100. Same TreeGiven two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes have the same...
2018-05-11 21:08:40
129
原创 Leetcode : 83 Remove Duplicates from Sorted List
题目如下:83. Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear only once.Example 1:Input: 1->1->2Output: 1->2Example 2:Input: 1-&...
2018-04-30 17:04:23
117
原创 Leetcode: Move Zeroes
题目如下:283. Move ZeroesGiven an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], af...
2018-04-30 16:32:59
116
原创 Leetcode:Merge Two Sorted Lists
题目如下:21. Merge Two Sorted ListsMerge 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...
2018-04-24 10:22:13
154
原创 python作业(10)
11-1 城市和国家: 代码如下:import unittestdef city_functions(city,country): full=city.title()+", "+country.title() return fullclass test_city(unittest.TestCase): def test_it(self): full=city_function...
2018-04-16 08:57:55
202
原创 python作业(9)
10-1 Python 学习笔记: 代码如下:filename='PythonLearn.txt'with open(filename) as F: contents=F.read() print(contents)with open(filename) as F: for line in F: print(line.rstrip())with open(filename...
2018-04-05 18:04:14
388
原创 python作业(8)
9-1 餐馆: 代码如下:class Restaurant(): def __init__(self, name, type): self.name=name self.type=type def open(self): print("The restaurant now is opening.") def describe(self): print("The name...
2018-04-03 23:45:20
472
原创 python作业(7)
8-2 喜欢的图书: 代码如下:def favorite_book(_title): print("One of my favorite books is "+_title.title())favorite_book("Alice in Wonderland") 运行结果: 8-3 T-shirt: 代码如下:def make_shirt(_title,size):...
2018-04-01 20:54:32
211
原创 python作业(6)
7-2 餐馆订位: 代码如下:num=input("Please tell me the number of guests:")num=int(num)if num>8: print("Sorry, there is no table available.")else : print("Please come here.") 运行结果: 7-3 10的整数倍: ...
2018-03-26 18:19:22
258
原创 python作业(5)
6-2 喜欢的数字: 代码如下:people={'Lily':'233','Jojo':'3','Bob':'5','admin':'7','Mike':'666'}for name in people.keys(): print(name+"'s favorite number is "+people[name]+".") 运行结果: 6-5 河流: 代码如下:peo...
2018-03-22 00:06:15
367
原创 python作业(4)
5-2 更多地条件测试: 代码如下:str1="AAAA"str2="BBBB"str3="AAAA"print("str1==str2? "+str(str1==str2))print("str1==str3? "+str(str1==str3))num1=10num2=60num3=10print(num1==num3 and str1==str2)print(nu...
2018-03-20 11:15:19
676
原创 python作业(3)
4-1 比萨: 代码如下:pizzas=['apple','banana','pepperoni']for pizza in pizzas: print("I like "+pizza+" pizza")print("I really love pizza!") 运行结果: 4-3 数到20: 代码如下:for num in range(1,21): print(n...
2018-03-15 23:31:01
365
原创 python作业(2)
3-2 问候语: 代码如下:names = ["Mike" , "JoJo" , "Yoyo"]for name in names: print("Nice to meet you, " + name) 运行结果: 3-4 嘉宾名单: 代码如下:names = ["Gates" , "Jobs" , "Zuckerberg"]for nam
2018-03-12 23:00:01
236
原创 python作业(1)
2-3 个性化信息: 代码如下:name=input("input your name! ")print("hello "+name+", would you like to learn some Python today?") 运行结果: 2-4 调整名字的大小写: 代码如下:name=input("input your name! ")print(name.uppe...
2018-03-09 11:12:42
365
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人