Comments (7)
Thank you for your interest in our work! They are not available in this repo; but since we designed TCN as a drop-in replacement for RNNs, you can simply replace lines like https://github.com/locuslab/TCN/blob/master/TCN/copy_memory/copymem_test.py#L70
with an RNN/LSTM/GRU, etc.
We did provide hyperparameters for LSTMs in the appendix of the paper :-)
As another source, pytorch examples provide tutorial code of LSTM for word-level language modeling. It is easy to change it (slightly) and use it for character-level LM as well: https://github.com/pytorch/examples/tree/master/word_language_model
from tcn.
@jerrybai1995 Thank you for your excellent work! I used https://github.com/pytorch/examples/tree/master/word_language_model and follow the hyperparameters in your paper(nlayer=3,hidden=700,dropout=0.4,clip=0.3, bias=1.0, sgd, lr=30, emb.=700),but i can't reproduce 78.93(ppl) on PTB, my result was valid ppl: 89.16, est ppl:85.50.
@millerjohnp What is your result?
Thank you very much!
from tcn.
Did you try tying the input embedding weights with the decoder weights? I think it’ll help.
from tcn.
@jerrybai1995 yes, i have used tied weight.
from tcn.
@jerrybai1995 It is very difficult to reproduce LSTM result. I have seen many papers that report results are different. Can you give a way to reproduce your paper? thank you very much!
from tcn.
Try SGD lr=20, and decay the learning rate when the validation error plateaus. Use a batch size of 16 or 20. Basically, I believe the original pytorch example’s README provides parameters that could achieve about 80 ppl, and it’s mainly a problem of hyperparameter tuning.
from tcn.
@jerrybai1995 Thank you for your excellent work! I used https://github.com/pytorch/examples/tree/master/word_language_model and follow the hyperparameters in your paper(nlayer=3,hidden=700,dropout=0.4,clip=0.3, bias=1.0, sgd, lr=30, emb.=700),but i can't reproduce 78.93(ppl) on PTB, my result was valid ppl: 89.16, est ppl:85.50.
@millerjohnp What is your result?
Thank you very much!
@jerrybai1995 The test ppl is 85.5(bias=0, there was a problem with the previous reply) ,and when set bais=1 in LSTM use the following code:
def init_weights(self):
initrange = 0.1
self.encoder.weight.data.uniform_(-initrange, initrange)
self.decoder.bias.data.zero_()
self.decoder.weight.data.uniform_(-initrange, initrange)
for name, param in self.rnn.named_parameters():
if 'bias' in name:
param.data.fill_(1)
the test ppl is 90 that is worse than before.
Also, i tried lr=20,and batch size=20, the result is almost the same, my pytorch version is 0.4.0
from tcn.
Related Issues (20)
- 函数调用问题
- LSTM and RNN used and issues of compatibility HOT 1
- issue about Input of TCN HOT 1
- ModuleNotFoundError: No module named 'tcn' HOT 2
- Clarification on figure 3(a) HOT 4
- Training on variable-length sequences HOT 1
- copy memory questions
- why raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled
- seq2seq
- How should I choose correct layers number?
- How to save model?
- Code Question about: input the final conv-layer output to the linear layer
- What is the accuracy supposed to be for the MNIST problem?
- Is TCN suitable for spatio-temporal data? HOT 7
- why?
- Correlate .mat files with songs in Nottingham dataset
- Zero padding - possibly incorrect behavior? HOT 1
- DDP training with TCN Model
- do you have code examples for multivariate time series
- loss=nan
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcn.