The repo for Tsinghua summer course: Interdisciplinary Seminar on Big Models
See qq doc for course discriptions and contents (Currently in Chinese only.)
The repo for Tsinghua summer course: Interdisciplinary Seminar on Big Models
The repo for Tsinghua summer course: Interdisciplinary Seminar on Big Models
See qq doc for course discriptions and contents (Currently in Chinese only.)
在作业2的参考代码pdf中,Model.py
文件里第9行:
def __init__(self, rnn_type, ntoken, ninp, nhid, nlayers, dropout=0.5, tie_weights=False):
在代码中的其他地方没有看到 tie_weights
参数。在图片中,tie_weights
的颜色为深蓝色,比旁边的淡蓝色的颜色更深,好像vs code用此方法表明此参数没有使用。
请问如果使用此参数,应该在参考代码的哪个地方添加相应代码,以及此参数的作用是什么。
在 Main.py
文件里第96行:
model = model.RNNModel(args.model, ntokens, args.emsize, args.nhid, args.nlayers, args.dr
猜想图片右边的缺失部分为:
opout, args.tied)
Main.py
文件里第36行对于 tied
的描述为:
tie the word embedding and softmax weights
在网上搜索 RNN tie_weights
关键字,前几个结果中的代码为:
# Optionally tie weights as in:
# "Using the Output Embedding to Improve Language Models" (Press & Wolf 2017)
# https://arxiv.org/abs/1608.05859
# and
# "Tying Word Vectors and Word Classifiers:
# A Loss Framework for Language Modeling" (Inan et al. 2017)
# https://arxiv.org/abs/1611.01462
if tie_weights:
if nhid != ninp:
raise ValueError('When using the tied flag, nhid must be equal to emsize')
self.decoder.weight = self.encoder.weight
在这里集合一些深度学习代码debug方法,欢迎大家补充自己的见解和优质帖子。
Slide目录下的PDF不能显示,无法下载。已经用了专门的上网线路,git的其它页面均正常。
谢谢🙏
exercises/L3_Transformers中给的demo_code中的数据加载那里,数据集的下载和加载应该是load_dataset,但是写成load_metric了。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.