fyabc / dl4nmt_theano Goto Github PK
View Code? Open in Web Editor NEWSome Theano NMT code based on DL4NMT.
Some Theano NMT code based on DL4NMT.
In libs/layers/lstm.py
, line 158
n_steps = state_below.shape[0]
n_samples = state_below.shape[1] if state_below.ndim == 3 else 1
If state_below.ndim == 3
, the code is correct. But when state_below.ndeim == 2
(in one_step mode), n_steps
should be 2, and n_samples
should be state_below.shape[0]
. In a word, the correct code should be
n_steps = state_below.shape[0] if state_below.ndim == 3 else 1
n_samples = state_below.shape[1] if state_below.ndim == 3 else state_below.shape[0]
The Same bug occurs at line 358, and also in libs/layers/gru.py
.
This bug will not affect the execution of the code, but I think it's better to fix it for clarity. Thanks.
In translate_single.py
, Line 48
if args.trg_att:
should be
if args.trg_attention:
In libs/utility/translate.py
, Line 205
pl_process = subprocess.Popen(
'perl multi-bleu.perl {} < {}\n'.format(ref_file, hyp_in), shell=True,
stdout=subprocess.PIPE, stderr=open(os.devnull, 'w'))
should be
pl_process = subprocess.Popen(
'perl scripts/moses/multi-bleu.perl {} < {}\n'.format(ref_file, hyp_in), shell=True,
stdout=subprocess.PIPE, stderr=open(os.devnull, 'w'))
and all the following codes runing perl scripts needs to be modified.
Hi,
Please specify "max_epochs" in "train_nmt.py" options to better control the training procedure, default number can be large.
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.