week3
!!!!!!!!! lecture 5:Language Models and Recurrent Neural Networks 1.Language Modeling Language Modeling is the task of predicting what word comes next 一种定义 另一种 n-gram language model 马尔可夫假设 稀疏性导致的问题 存储问题 还有可能不同单词之间的概率太过接近 评估语言模型:困惑度(perplexity) 建造神经语言模型 固定窗口的神经语言模型 2.recurrent neural networks(RNN) core idea:重复应用相同的权重 train teacher forcing:使用原本的输入序列而不是模型上一步的输出作为输入接着算,好处是减少模型初期的误差带来的影响 序列学习:错开一位 deep bidirectional rnn (注意正向和反向的权重是不一样的) 它更为强大,在能获取整个序列的时候应该作为你的默认选择 也可以是...
cs224n
work1: 单词: cooccurrence matrices(共现矩阵) symmetric(对称) semantic(语义学的) synonyms(同义词) antonyms(反义词) analogy (类比) cooccurrence matrices: func1:去除重复单词并计数(利用set的特性) #复习内容:集合def distinct_words(corpus): """ Determine a list of distinct words for the corpus. Params: corpus (list of list of strings): corpus of documents Return: corpus_words (list of strings): sorted list of distinct words across the corpus n_corpus_words (integer): number...
18.04复变
complex algebra and plane 复数的模:magnitude,absolute value,norm,modulus z=x+yi=reiθ where r is the magnitude,theta is the argsz=x+yi=re^{i\theta}\text{ where r is the magnitude,theta is the args}z=x+yi=reiθ where r is the magnitude,theta is the args complexification(complex replacement) 对于 I=∫excos2xdxIc=∫(excos2x+iexsin2x)dxI=Re(Ic)\begin{aligned} I=\int e^xcos2xdx\\\\ I_c=\int (e^xcos2x+ie^xsin2x )dx\\\\ I=Re(I_c) \end{aligned} I=∫excos2xdxIc=∫(excos2x+iexsin2x)dxI=Re(Ic) find nth root ...
csapp_proxylab
networkprogrammingP1 lowest level:ethernet segment(以太网) 一个房间或者一栋建筑这种,一组的host通过线连接到hub的port 每个有一个独有的48位地址(MAC address),以chunk为单位发送数据 在不同标准的设备之间通信:protocol software run on the rounter and host(提供命名规范和行为机制) ipv4:32位大端法存储,这被映射到网址(域名) 三级域名:第一级(.com,.edu等)第二级(mit,berkeley等)第三级(www.等) DNS(domain naming system) 每个主机都有自己的局部域名localhost 127:0:0:1 常见命令:nslookup\hostname 域名和地址之间不是一一对应的关系,大型网站全球都有DNS所以可能不一样,甚至可能有效的域名不指向任何地址 connection:client and server use it to send message socket:endpoint of ...
MIT missing semester
shell first 重命名:mv ls -ldrwxr-xr-x 1 missing users 4096 Jun 15 2019 missing 详细列出 首先,本行第一个字符 d 表示 missing 是一个目录。然后接下来的九个字符,每三个字符构成一组。 (rwx). 它们分别代表了文件所有者(missing),用户组(users) 以及其他所有人具有的权限。其中 - 表示该用户不具备相应的权限。从上面的信息来看,只有文件所有者可以修改(w),missing 文件夹 (例如,添加或删除文件夹中的文件)。为了进入某个文件夹,用户需要具备该文件夹以及其父文件夹的“搜索”权限(以“可执行”:x)权限表示。为了列出它的包含的内容,用户必须对该文件夹具备读权限(r)。对于文件来说,权限的意义也是类似的。注意,/bin 目录下的程序在最后一组,即表示所有人的用户组中,均包含 x 权限,也就是说任何人都可以执行这些程序。 man +命令名 可以直接查看帮助(q退出) 流 通常程序的输出和输入流都是终端 > file < file最简单的重定向 您还可以使用...
STAT110x
unit1 Probability counting and story proof 1.2 样本空间可有限可无限,有限就可以变成pebble world 这种情况下做实验等价于从peddles中随机采样 Each pebble represents an outcome, and an event is a set of pebbles dictionary of set theory 德摩根定律:交集的补集=补集的并集 1.3 restrictions:等可能并且样本空间有限 1.4 乘法原则 1.5 story proof 1.6 general definition 关于概率函数: 1.频率观点:认为概率表示一种在大量重复实验条件下的长期频率 2.贝叶斯观点:对所讨论事件的信任程度 work word axiom:公理 factorial:阶乘 unions, intersections, and complements:并集、交集、补集 unit2 conditional probability ...
the art of command line
the shell script 第一个程序 $ echo '#!/bin/sh' > my-script.sh#必须用单引号$ echo 'echo Hello World' >> my-script.sh#追加在末尾$ chmod 755 my-script.sh#使程序可执行$ ./my-script.shHello World$ 学会如何使用 man 命令去阅读文档。学会使用 apropos 去查找文档。知道有些命令并不对应可执行文件,而是在 Bash 内置好的,此时可以使用 help 和 help -d 命令获取帮助信息。你可以用 type 命令 来判断这个命令到底是可执行文件、shell 内置命令还是别名。 first script #当注释用 #!/bin/sh#指定:that what follows should be interpreted by the Bourne shell.# This is a comment!echo Hello World # This is a comm...
csapp_shelllab
Linking why linkers: modularity:更结构化,可以写library啥的 efficiency:部分更改的时候无需重新编译,library放常用的很多函数,实际上还是只链接用到的 what linker do: symbol(全局变量和函数,被存为包含信息的结构体) resolution: symbol definition被放在.o文件的symbol table(an array of symbol)中 在第一步中associate each symbol reference to exact only one definition relocation: 合并所有代码,将.o中的相对位置更改为绝对位置同时更行all reference to the symbol symbol resolution linker symbols: global symbols:non-static全局变量和函数 external symbols:由m模块引用但是由其它模块定义 local symbols:defined and r...
fundametal of statistics
Distributions Derived From the Normal Distribution some distribution inflection point:拐点 bell curve:正态曲线 moment generating function:矩生成函数 矩生成函数可用于计算分布的矩:关于 0 的第n个矩是矩生成函数的第n阶导数,在 0 处求值。(另一种对概率分布的描述) 矩可以视为(moving to average) chi-square distribution(卡方分布) gamma distribution:描述的是等待n个事件发生的时间之和 (Y=∑i=0nXiY=\sum^n_{i=0} X_iY=∑i=0nXi),记为(Y∼Gamma(α,λ)Y\sim Gamma(\alpha ,\lambda)Y∼Gamma(α,λ))前者为事件次数,后者为单位时间内的的发生率 student’s t distribution 自由度为r的t分布,当k<r时,积分收敛,k次矩存在(重尾性) T的矩生成函数除了在0...
csapp_malloclab
virtual memory:concept address space linear address space:有序连续非负整数集 virtual address space:set of N=2^n virtual addresses physical address space:set of M=2^m physical addresses why VM: use dram as a cache for parts of the virtual address space 简化内存管理 隔离地址空间 vm as a tool for caching 概念上讲:vm就是n个连续的在磁盘上的字节数组 硬盘上的数组内容缓存在物理内存(dram cache)中 这些缓存块称为page(P=2^p),通常比高级的缓存大得多 需要一个复杂得多的映射函数 总是使用write-back rather than write-through page miss(就是缓存未命中)cause page fault(an exception) 解决:page fault...



