xuewyang / lasyn Goto Github PK
View Code? Open in Web Editor NEWCodes and datasets for EMNLP 2019 paper Latent Part-of-Speech Sequences for Neural Machine Translation
Codes and datasets for EMNLP 2019 paper Latent Part-of-Speech Sequences for Neural Machine Translation
Hi,
Thanks for your great work! When I tried to reproduce your experiments, I got the following problem:
Traceback (most recent call last):
File "/nfs/Desktop/MT/Syn-MT/fairseq_cli/train.py", line 422, in <module>
cli_main()
File "/nfs/Desktop/MT/Syn-MT/fairseq_cli/train.py", line 418, in cli_main
main(args)
File "/nfs/Desktop/MT/Syn-MT/fairseq_cli/train.py", line 93, in main
trainer.dummy_train_step([dummy_batch])
File "/nfs/Desktop/MT/Syn-MT/fairseq/trainer.py", line 364, in dummy_train_step
self.train_step(dummy_batch, dummy_batch=True)
File "/nfs/Desktop/MT/Syn-MT/fairseq/trainer.py", line 215, in train_step
raise e
File "/nfs/Desktop/MT/Syn-MT/fairseq/trainer.py", line 203, in train_step
ignore_grad
File "/nfs/Desktop/MT/Syn-MT/fairseq/tasks/fairseq_task.py", line 280, in train_step
loss, sample_size, logging_output = criterion(model, sample)
File "/opt/conda/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__
result = self.forward(*input, **kwargs)
File "/nfs/Desktop/MT/Syn-MT/fairseq/criterions/label_smoothed_cross_entropy.py", line 317, in forward
loss1, nll_loss, loss_c, nll_loss_c = self.compute_loss(net_output, sample, reduce=reduce)
File "/nfs/Desktop/MT/Syn-MT/fairseq/criterions/label_smoothed_cross_entropy.py", line 343, in compute_loss
gamma = self.e_step(Pz_x, Py_zx)
File "/nfs/Desktop/MT/Syn-MT/fairseq/criterions/label_smoothed_cross_entropy.py", line 381, in e_step
gamma = Pz_x * Py_zx # responsibility # B, S, 40
RuntimeError: The size of tensor a (32) must match the size of tensor b (40) at non-singleton dimension 1
Do you have any idea about how to solve it?
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.