如果想产生一个[0.01,0.02,…,1.00]的list:
1 | NOTE: FOR python3 only. |
如果想产生一个[0.01,0.02,…,1.00]的list:
1 | NOTE: FOR python3 only. |
Ground Truth boxes: The masks labeled in the original data.
proposed the impotance of features.
Features matter, the first sentence of RCNN paper.
Generalize the CNN classification results on ImageNet to object detection
BY
bridging the gap beween image classification and object detection.
generating category-independent region proposals. Use Selective search ( a traditional machine learning method).
1 | Input: image |
A CNN model.
Input: $(227,227,3)$
Output features: $(4096)$
For each proposal, SVM generates an expected class and corresponding confidence. Final results only include proposals with IoU (Intersection of union) [Bounding box] overlap with a higher scoring selected region larger than a learned threshold (pretty important according to the paper).
Train:
Use 10M+ images as input, for each feature unit, a output value will be generated. Then rank the 10M+ value and show images with corresponding top 10 values. (Speak for themselves)

[Each row indicates the result of each feature unit]
$f(P_x, P_y, P_w, P_h) = (\hat{G_x}, \hat{G_y}, \hat{G_w}, \hat{G_h})$
and
$(\hat{G_x}, \hat{G_y}, \hat{G_w}, \hat{G_h}) \approx (G_x, G_y, G_w, G_h)$
$W_* = argmin_{w_*} \sum_i^N(t_*^i - \hat w_*^T\phi_5(P^i))^2 + \lambda || \hat w_*||^2$
$t$ : real changing needing to do.
$w$: learned changing, which need to be regression.

Two differences:
Any size($16\times20$ for example ) of ROI’s corresponding feature maps will be transformed into fixed size(7*7 for example).
Using a windows of size($16/7\times20/7$) to do max pooling.
derivatives are accumulated in the input of the ROI pooling layer if it is selected as MAX feature unit.
Brute force: fixed size ( single scale)
finesses multi scale
Overall loss = Loss of classification + bounding box regresssion
Typically, The bounding box loss is different!
$L_{bbr} = $
To avoid exploding gradient . (Previous $L_{bbr}’ = 2|x|$)
Mini batch size = 128 = 64 RoIs /image * 2images
RoIs = 25% proposals generated AND IoU>0.5
一组 iou > IOU_THRESHOLD 的proposals。以 iou排序, 选取最大的那个proposal, 计算其他proposals和他的iou,大于 NMS_THRESHOLD 的 全部删掉 (和最好的那个重复太多),一直重复遍历。
晓霞牺牲了。
读到此时,不禁涕泗横流,忽然明白了不忍卒读的意味。书里面的晓霞是如此的美好,少平每次生活中乌云密闭的时候,她便会如阳光一般驱散所有的阴霾。她体贴他,知道少平不愿意她去看他的破住处,她还关心他,看到了破烂的被褥后自己偷偷给少平换了一床全新的被单,她还深爱着他,不管阶级差距如何、生活差距怎样,都一如既往的、哪怕少平吃醋了小心眼了,也一如既往的热忱的表达自己的爱意。
但是悲剧就是把这样美好的女主角摧毁给你看。
书中的故事太多了,几十万字里饱含了贫苦家庭或一般家庭会面临的种种问题,不管谁都能从书中读到自己。譬如少安三兄妹年轻时候的懂事,我仿佛也看到了小时候那个小心谨慎生活着的懂事的自己。
但是平凡的世界不是童话,再多的故事往往总会有悲伤在其中。润叶和少安青梅竹马,两小无猜,但是少安最终还是屈服于了阶级差距,说到底还是屈服于自己的思想差距。虽然两人都遇到了深爱他们的对象,但是两个人的爱情却也都不完美,忙活了整本书的少安和秀莲,好不容易可以享一点幸福时,秀莲却倒下了。而润叶更是在悲剧发生后,才愿意接受自己的选择。
但是平凡世界中的人们却不会平凡。哪怕路途艰险,少安、少平总会咬牙坚持过去,我想这也是他们人格魅力所在。少平背砖血肉绽开的画面我从初中就难以忘怀,少安欠了一万多的债时差点一蹶不振,但幸运的是有他的秀莲,帮助他度过了难关。
路遥先生觉得少平和晓霞的爱情太过完美,在那个时代不是正常的,只可能是童话故事。但我真的相信,受过足够多书本熏陶的两人,是有足够的勇气和眼界去拥抱爱情的,而且书中的“完美无缺”的田福军,也不是如田福堂一般的”老古董“。
田晓霞,这也许是八十年代那一代青年幻想中的最美好的女生,但不论时光如何变化,社会怎样变迁,她身上的可贵品质:正直、热情、眼界开阔、不嫌贫、执着、对爱情的向往和忠贞,也是我等之辈可以学习的。
河南人是中国的吉普赛人,全国任何地方都可以看见这些不择生活条件的劳动者。试想,如果出国就象出省一样容易的话,那么全世界也会到处遍布河南人的足迹。他们和吉普赛人不一样。吉普赛人只爱飘泊,不爱劳动。但河南人除过个别不务正业者之外,不论走到哪里,都用自己的劳动技能来换取报酬。
有一次,同学们在校院里玩“找朋友”的游戏。他不敢到人圈里去,因为他屁股后面的补钉又绽开了,肉都露在了外面。他看别人玩,自己脊背紧贴着教室墙,连动也不就动。有一个男孩子大概早发现他裤子破了,这时就串通几个人一扑上来,把他拉在了人圈里。所有的男娃娃都指着他的屁股蛋“噢”一声喊叫起来,并且起哄唱起了那首农村的儿歌:烂裤裤,没媳妇,尻子里吊个水鸪鸪……女娃娃们都已经到了懂得害羞的年龄,红着脸四散跑了。 他又难受又委屈。下午放学后,也没回家去。他一个人转到金家祖坟后面的一个土圪崂里,睡在地上哭了一鼻子。土圪崂上面就是高高的神仙山。他想起了老人们常说的那个下凡的仙女;也想起了那个痛哭而死的男人——那男人的眼泪就流成了脚下的哭咽河。哭咽河,哭咽河,男人的眼泪流成的河…… 他突然听见润叶轻轻地喊他。他慌忙坐起来,臊得满脸通红。润叶站在他旁边,说:“我回家里拿了针线,让我给你把补钉缝一缝……” “你不会做针钱!”他不愿让润叶缝那块补钉——因为那是个丢人地方。 “我学会做针线了,让我试一下!”润叶说着便蹲在他身边,硬掀转他的身子,便笨拙地给他缝起来了。那时润叶才十岁,说不上会做针线,只是胡串了几针,让原来的补钉能遮住羞丑。她的针不时扎在他的屁股蛋上,疼得他直叫唤。她在后面笑个不停。勉强缝完后,她让他站起来走一走。 他刚站起来走了几步,就听见后面“嘶”的一声——又破了! 润叶捂住嘴,笑得前伏后仰,说:“没顶事!让我再缝!”他赶忙说:“算了!我回去叫我妈缝……”
对父亲说:“爸爸,我回来劳动呀。我已经上到了高小,这也不容易了,多少算有了点文化。就是以后在村里劳动,也不睁眼睛受罪了。我回来,咱们两个人劳动,一定要把少平和兰香的书供成。只要他两个有本事,能考到哪里,咱们就把他们供到哪里。哪怕他们出国留洋。咱们也挣命供他们吧!他们念成了,和我念成一样。不过,爸爸,我只是想进一回初中的考场;我要给村里村外的人证明,我不上中学,不是因为我考不上!”
他现在认识到,他是一个普普通通的人,应该按照普通人的条件正正常常的生活,而不要做太多的非分之想。当然,普通并不等于庸俗。他也许一辈子就是个普通人,但他要做一个不平庸的人。在许许多多平平常常的事情中,应该表现出不平常的看法和做法来。比如,象顾养民这家伙,挨了别人的打,但不报复打他的人——尽管按常情来说,谁挨了打也不会平平静静,但人家的做法就和一般人不一样。这件事就值得他好好思量思量。这期间,少平获得了一个非常重要的认识:在最平常的事情中都可以显示出一个人人格的伟大来!
顾养民渐渐觉得,孙少平身上有一种说不清楚的吸引力——这在农村来的学生中是很少见的。他后来又慢慢琢磨,才意识到,除过性格以外,最主要的是这人爱看书。知识就是力量——他父亲告诉他说,这句话是著名英国哲学家培根说的。是的,知识这种力量可以改变一个人,甚至可以重新塑造一个人。养民自己出身知识分子家庭,因此很能理解这一点。
村里来了工作干部轮上他们管饭,家里总要把少得可怜的白面拿出来一点,给公家人做一顿好吃的。客人不会都吃完,最后总要剩那么一两碗。这样的时候,家里人就找不见兰香,她早已经找借口躲出去了,她知道,剩下的这点好饭,应该让奶奶吃。就是奶奶不吃,也应该让爸爸和哥哥吃——他们出山劳动,活苦重
孙兰香站在这悲伤的人群中哭着。她想起奶奶和爸爸常给她说的,是毛主席把他们这样的穷人从旧社会的苦海中救了出来。从她记事开始,要是哪一年有了灾害,他们家都要吃国家的救济粮。奶奶和爸爸说,这都是毛主席老人家给他们的!要是旧社会,遇到年馑,不知要饿死多少人呢!他们全家都深深热爱大救星毛主席。每年过春节,穷得哪怕什么也不买,但总要买一张毛主席像贴在墙壁上。现在,没有了毛主席,以后可怎么办呀?
她开始动摇了。她的力量使她无法支撑如此巨大的精神压力。当然,除过客观的压力以外,她主观上的素养本来也不够深厚。是的,她现在还不能从更高意义上来理解自身和社会。尽管她是一个正直善良的人,懂事,甚至也有较鲜明的个性,但并不具有深刻的思想和广阔的眼界。因此,最终她还是不能掌握自己的命运。 于是,她的所有局限性就导致她做出了违背自己心愿的决定:由于对爱情的绝望,加上对二爸的热爱,她最后终于答应了这门亲事……
从古到今,人世间有过多少这样的阴差阳错!这类生活悲剧的演出,不能简单地归结为一个人的命运,而常常是当时社会的各种矛盾所造成的。
NAME: Li Wei
SID: 1155062148
In this section, I will introduce and justify my criteria and state my assumptions I make when designing this kind of criteria. Typically, fuzzy criteria will be highlighted.
The stock with highest PE in same type will be excluded. This criteria is inspired by the introduction of PE in the specification:
PE(Price-Earning Ratio) = Market price / EPS(earning per share). Usually lower is better, but it depends on the PE ratio of the similar stocks. (However, if some types contain only one stock in the database, then this special stock won’t be excluded.)
high buying level. High buying level means more stable and has less risk. The following is the corresponding fuzzy membership function.
| Buying level | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| $\mu_{high_buy_lv}$ | 0.1 | 0.3 | 0.5 | 0.7 | 0.9 |
high difference. High difference level means that the stock may have more profit but also more risk. The following is the corresponding fuzzy membership function. However, the difference between ‘too high’ and ‘very high’ is not huge. Therefore the fuzzy memebership function is not linear.
| Difference | 0 | 25 | 50 | 75 | 100 | 125 | 150 | 175 | 200 | 225 | 250 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| $\mu_{high_diff}$ | 0.0 | 0.2 | 0.4 | 0.6 | 0.75 | 0.8 | 0.85 | 0.9 | 0.95 | 0.98 | 1.0 |
This section is to introduce the query we design:
1 | STOCK_CLASS(NAME) (or ((and (= Type SEMI) (< PE 31)) |
The stock with highest PE in same type will be excluded.
| NAME | PRICE | ORIGI N | TYPE | PE | PE_LV | BUY_LV | DIFF | DIFF_LV |
|---|---|---|---|---|---|---|---|---|
| AAPL | 167 | US | TECH | 18 | 1 | 4 | 33 | 2 |
| 110 | US | 31 | 2 | 4 | 47 | 2 | ||
| FB | 187 | US | WWW | 35 | 2 | 5 | 43 | 2 |
| MU | 44 | US | SEMI | 7 | 1 | 5 | 80 | 3 |
| BABA | 205 | CHN | WWW | 55 | 4 | 5 | 101 | 4 |
| KM | 120 | CHN | FOOD | 39 | 3 | 4 | 220 | 5 |
| SAMSUNG | 2325 | KOR | SEMI | 9.53 | 1 | 4 | 25 | 1 |
| NINTENDO | 440 | JPN | GAME | 50 | 3 | 4 | 200 | 5 |
| TENCENT | 59 | CHN | WWW | 58 | 4 | 4 | 230 | 5 |
| 85 | US | 66.4 | 5 | 3 | 90 | 4 |
high buying level and high difference level.
| Name | Buying level | Difference level | Membership(min) |
|---|---|---|---|
| AAPL | $\mu_{high_buy_lv}(4) = 0.7$ | $\mu_{high_diff}(33)=0.2$ | 0.2 |
| FB | $\mu_{high_buy_lv}(5) = 0.9$ | $\mu_{high_diff}(43)=0.2$ | 0.2 |
| MU | $\mu_{high_buy_lv}(5) = 0.9$ | $\mu_{high_diff}(80)=0.6$ | 0.6 |
| BABA | $\mu_{high_buy_lv}(5) = 0.9$ | $\mu_{high_diff}(101)=0.75$ | 0.75 |
| KM | $\mu_{high_buy_lv}(4) = 0.7$ | $\mu_{high_diff}(220)=0.95$ | 0.7 |
| SAMSUNG | $\mu_{high_buy_lv}(4) = 0.7$ | $\mu_{high_diff}(25)=0.2$ | 0.2 |
| MINTENDO | $\mu_{high_buy_lv}(4) = 0.7$ | $\mu_{high_diff}(200)=0.95$ | 0.7 |
| TENCENT | $\mu_{high_buy_lv}(4) = 0.7$ | $\mu_{high_diff}(230)=0.9$ | 0.7 |
Therefore, the system will select BABA to buy from our calculation.
a collection of entities and relationships
Entity set is a collection of entities of the same type. All entities in a given entity set have the same attributes ( the values may be different).
Domain: domain of possible values of each attribute in an entity set.
superkey: any set of attributes which can uniquely identify an entity
key (candidate key): a minimal set of attributes whose values can uniquely identify an entity in the set. (should depend on the real life possibility 即使还有entity 加入/删除, 这个key永远identify an entity)
primary key: a candidate key chosen to serve as the key for the entity set
an association among two or more entities.
eg. Teach: (John,CENG4567) ,(David, CSCI1234)
relationship set: a set of similar relationships: {(John,CENG4567) ,(David, CSCI1234)}
relationships can also have descriptive attributes
Recursive Relationship: relationship两边entity其实一样

Tenary:aggregation把3个变成2个
similar with one to many, but have two arrows
strong entity , an entity which has a super key
weak entity 相反
若需要identify一个weak entity: –by considering some of its attributes in conjunction with the primary key of employee (identifying owner).
partial key 例如:教授家属需要identify就需要(教授id,家属名字)

Overlap constraint 两个subclass能否包含相同entity (default:no)
Cover constraint 是否subclass包含了superclass里所有entity ( default:no)
A relationship between a collection of entities and relationships

main construct: a set of relations
relation consists of relation schema and relation instance
Simply a table with rows and columns
specifies relation’s name, name of each field(primary key should be underlined), domain of each field
Degree/arity of a relation: number of fields
Cardinality of a relation instance: number of tuples
Relational database : a collection of relations
Instance: a collection of relation instances (one per relation schema).
1 | CREATE TABLE Students |
restricts the data that can be stored in an instance of the database on a database schema
Certain minimal subset of the fields (candidate key) of a relation is a unique identifier for a tuple (instance).
设计者可以自己identify a primary key(比如index)
1 | CREATE TABLE Students |
Sometimes, the information stored in a relation is linked to the information stored in another relation.
Enrolled(sid: string, cid: string, grade: string) sid就是Enrolled这个relation的 foreign key and refer to Students
Formally, a foreign key is a set of fields (the primary key of s) in one relation r that is used to “refer” to a tuple in another relation s.
1 | CREATE TABLE Enrolled ( |
four options on DELETE and UPDATE.
entity sets -> tables
relationship sets(without constraints) -> tables,attributes包括

with constraints
weak entity
将weak entity及对应relation 统一为一个table 并且(ON DELETE CASCADE)
Class hierarchies
different relations (父母孩子都有)
more general。
(仅有孩子)
not always possible。can be accessible easily
Aggregation
a boolean combination (an expression using logical connectives $\wedge \vee$)

extract columns from a relation
duplicated row will be eliminated

must be union-compatible:
also union-compatible
also union-compatible
$R\cap S = R-(R-S)$
$\rho (R(F),E) \ or\ \rho(R,E)$
E: arbitrary relation algebra ,F:renaming list, R= E 除了F rename的东西

Join can be defined as a cross-product followed by selections and sometimes with projections.





1 | SELECT S.sname |
LIKE for string matching. _ = any one character, % = 0 or more arbitrary characters
1 | COUNT([DISTINCT] A) |
1 | eg Find the age of the youngest sailor for each rating level. |

1 | SELECT R.day |


Delete view:DROP VIEW Temp
S LEFT OUTER JOIN R: S 中不对应 R的也会加进去。 只是R的field就是 NULL
FULL OUTER JOIN: both
Li Wei 1155062148
There are hundreds of programming languages to use now, which make it difficult for programmers to decide which language is the most suitable for them.
Below picture (cited from Quora) also shows that many people, no matter they are experienced programmers or not, have the question:
Which programming language should I learn next?

Motivated by the wide range of discussion: “ best programming language to learn” and our former hesitant experience when deciding which programming course to enroll, we decided to design a Fuzzy expert system to solve these kinds of problems.
The users do not have a clear knowledge on different programming language, which make them hard to select the best/ most suitable programming language for them to learn.
The Fuzzy system is designed for recommending suitable programming languages for users to learn. And rules are provided for inference so that users need to answer some simple programming habits questions, which are used as facts in the system.
numpy in python) requirements of programming language.(conclusion)
preset values of the result
expectation_of_difficulty
time_spent_on_learning
available_resource
experience
package_requirement
efficiency_requirement
upset_when_debug
market_requirement
whether the reason user learns programming is for finding a job.
company_orientation
the expected IT companies the user wants to work for.
interest_field
the expected programming field the user wants to work in.
compiled_language_or_not
whether the user is suitable for compiled language or not.
Rules in the system is divided into two perspectives: Facts and languages.
For the facts perspective, the rules help to inference the conclusion and other objects such as expectation of difficulty by facts. Here are some examples:
1 | RULE CODE:difficulty_rule_easy_111 |
For the languages perspective, the rules help to inference the conclusion by languages, this kind of rule makes use of the key features of different programming language. Here is one example:
1 | RULE CODE:js_rule_2 |

Given these facts:
The results are:
.png)
.png)
.png)
Our system has done a basic programming language recommendation task, which covers almost all possibilities. And the result is really practical for uses.
However, the system can not solve a few specific language requirements well, such as Database programmer and so on.
According to what we mentioned above, the system can be still improved by importing more language-based rules so that the system can handle some specific language requirements better.
| Work | Liu Boyi | Li Wei |
|---|---|---|
| Brainstorm the topic | yes | yes |
| Conduct survey and collect expert knowledge | yes | yes |
| Design the system (Main workload) | yes | yes |
| Coding the Fuzzy Set and Object part | yes | |
| Coding the Rule part(Main workload) | yes | yes |
| Test and debug | yes |
一个人的命运 固然要靠个人的奋斗 但是也要考虑历史的进程 —呱呱呱
中大四载,明白的最深刻的道理就是上面这条了。
放大来说,先人杜甫,比我们不知道高到哪里去了,在那个年代也会沦落到被几个小毛孩欺负。
从小了来说,我们每个20出头的愣头青,有的人拼死拼活还是在B,有的人混一混就能拿个A leve。姑且先不说是不是学校差别,比如一个来自人大(苏州),一个来自中大。我们就拿中大自己人来说的话,有个深刻的道理:
选课 也是一门学问。
有的时候不是说好好上课努力学习final感觉满分就一定能拿A(说你呢 4430),因此本文是我们用拍死在沙滩上的泪水
献给 年轻的学弟学妹们,愿天堂没有GPA。
注意:本文纯属个人见解,如有冒犯,请联系。
格式:
课程代码,课程名称,课程教授
description
workload
grade
我那个年代(14-15)内地生给分福利。老师上课有趣。
只有一些粤语阅读 和 演讲。
据说 最低A-
梁老教授快退休了,但是为人和善,也是我最尊敬的几位教授之一,每次大家的weekly presentation 他都听的特别认真,真的是肃然起敬。
ELITE的AI比一般的会多一个DNN的project,不过之前有过经验的话倒是挺简单的。
如果有过DNN经验,final前好好复习(pastpaper!) 一般A level是没问题的。
基本都是高中学过的,有一些没学过的也是奥赛(自主招生)会学的。总之基本上大一的数理课是相当简单。
一般都是 weekly assignment + mid term + final
只要别完全划水,A level也是OK的
讲的东西特别有趣!感觉自己是当代诸葛,上知天文了哈哈哈,小时候很多为什么都是那个时候了解的。
忘了。
有兴趣的话 拿A还算没毛病。
挺不错的一门课,看得出来老师在试图讲的有趣哈哈哈。
一篇paper + 一次开卷考试
我拿的是A-。。因为感觉基本就写了篇paper就拿了A level,有点受之有愧
BY Li Qi:
IE出名的给分好颓课,唯一要注意的是教授会尝试记住每个人,尤其ELITE,所以千万别翘课。他会给每个人照相,然后打印出一张座位相片名字表。。。。。。
homework + mid-term + project
反正我认识的都是A…没选这门课真是气死我了!
考试和project没有任何关系。。mid-term有点理科的感觉,final完全就是文科考试了,不过和TA拉好关系是有帮助的!
assignment + mid-term + final + project(4人抱团把天赋带到搭网站。。。那段时间连续通顶一个星期)
其实一般CS的major, final 和mid term才是关键。project大家分数差不多。所以final好好复习 A level也是没问题的。
两门课其实差别挺大的,放一起是因为给分,workload都是类似的。而且两位教授之前在中大是师生关系哈哈哈哈。
正常的weekly assignment + mid term + final,不过挺多人吐槽比较难。(不过相信我,你听到的大部分内地生吐槽难,炸了都是在装!)我反正觉得还OK。
好好学习A- 是有的,A就是可遇不可求了。
当时为了凑ELITE分数选这门课,同时想着复数应该还有点用。现在特别后悔。。是我上过workload最大!的一门课!
weekly assignment + mid term + final + presentation + paper
emm。。。虽然ELITE后面的都没听懂了,不过final好像考的并不难 基本都会做。所以A-还是可以的。
怎么说呢。。其实我是想把他放在 给分烂 难度低里面的哈哈哈。课挺有意思的,也解答了我很多最开始玩电脑时候的问题,全程顺风顺水,但最后拿个A-还是不满意的。毕竟我难得有一门专业课这么扎实的学啊。
workload一般 主要还是final得考好把。。
我前面都是满分,final估分满分,最后拿个A-。。哎。
Welcome to 3150! 也是出名的workload巨大。不过OS这种课本来就基础而且难,所以也怨不了Eric,而且教授讲课也是特别仔细,一个问题会整的明明白白的。不过。。final 考一个一百行代码找一个bug是什么鬼啊!!!
code assignment + mid term(巨难)+final(巨难)
带没啥好说的。CS内地生我只清楚两个拿A level的。
Whose bell rings? 这个梗懂得就懂。Jimmy是我印象里对教书最认真负责的一名教授,也难怪拿了两次 best teacher。不过必须要diss一下jimmy的是。。他那个code作业真的是太难了。。。
code assignment + mid term + final
给分已经不重要了,我只知道前面两次code assignment我是生不如死。
以上就是所有印象深刻的课程。如有遗漏/新的见解 欢迎补充~
remove seeds from images and increase contrast between normal and abnormal brain tissues