这个project是基于PyTorch 0.4.0版本写的。由于现在的PyTorch已经升级到了1.6.0版本,很多代码的写法不太符合最新的版本,所以欢迎大家重写我的代码然后send pull request!
A PyTorch tutorial
JULYEDU PyTorch Course
这个project是基于PyTorch 0.4.0版本写的。由于现在的PyTorch已经升级到了1.6.0版本,很多代码的写法不太符合最新的版本,所以欢迎大家重写我的代码然后send pull request!
A PyTorch tutorial
model.load_state_dict(torch.load("embedding-{}.th".format(EMBEDDING_SIZE)))
是词向量保存在embedding-{}.th这个文件中吗?
TEXT.build_vocab(train_data, max_size=25000, vectors="glove.6B.100d", unk_init=torch.Tensor.normal_)
可以像打开glove词向量的方式打开它吗??
RuntimeError Traceback (most recent call last)
in
11
12 if USE_CUDA:
---> 13 input_labels = input_labels.cuda()
14 pos_labels = pos_labels.cuda()
15 neg_labels = neg_labels.cuda()
RuntimeError: CUDA error: out of memory
你好,褚博士
为什么hidden需要grad,下一个seq只需要hidden中的值,不需要hidden的梯度啊
复现词向量代码过程中,在使用dataloader时,会报BrokenPipeError这个异常,网上没有找到好的解决方案。
论文中写的是用target的当前hiddenstate和整个Encoder_outputs来计算,但是第七课seq2seq的代码中是这样算的:
context_in = self.linear_in(context.view(batch_size*input_len, -1)).view( batch_size, input_len, -1)
attn = torch.bmm(output, context_in.transpose(1,2))
这里的context是不是应该更换成当前时刻的hiddenstate
褚博士,您好
我想问下第三课语言模型中为什么最后一层使用的是linear而不是softmax?这样做似乎对这个模型没有什么影响,loss依然下降了,但最后输出应该是一个分类器。这就相当于做二分类任务时,不用sigmoid直接用交叉熵CE作为loss函数,想请教下这样对于分类会造成什么样的影响?反之,如果做分类任务时,不用交叉熵只用sigmoid和MSE作为loss函数,又会有什么影响呢?感觉后者的影响更大。
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.