tuzhaopeng / nmt-coverage Goto Github PK
View Code? Open in Web Editor NEWAttention-based NMT with a coverage mechanism to indicate whether a source word is translated or not
License: BSD 3-Clause "New" or "Revised" License
Attention-based NMT with a coverage mechanism to indicate whether a source word is translated or not
License: BSD 3-Clause "New" or "Revised" License
请问下大神
@tuzhaopeng 多谢多谢
你好,
我在运行THEANO_FLAGS='floatX=float32,device=gpu1' python sample.py --beam-search --state search_state.pkl search_model.npz --beam-size 5 --source test/ctb.s --trans test/ctb.t
一直有这样的错,不知道是什么样的原因
theano.compile.function_module.UnusedInputError: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 1 is not part of the computational graph needed to compute t
Hi,
I was trying to train a model using the following command on a custom dataset:
python train.py --state german-data.py
I tried this with theano version 0.8.2 and 0.9 as well.
I faced the following error:
Traceback (most recent call last):
File "train.py", line 100, in <module>
main()
File "train.py", line 81, in main
enc_dec.build()
File "/projects/tir1/users/cmalaviy/NMT-Coverage/experiments/nmt/encdec.py", line 1864, in build
c=self.sampling_c)
File "/projects/tir1/users/cmalaviy/NMT-Coverage/experiments/nmt/encdec.py", line 1725, in build_sampler
name="{}_sampler_scan".format(self.prefix))
File "/projects/tir1/users/cmalaviy/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan.py", line 1071, in scan
scan_outs = local_op(*scan_inputs)
File "/projects/tir1/users/cmalaviy/anaconda2/lib/python2.7/site-packages/theano/gof/op.py", line 615, in __call__
node = self.make_node(*inputs, **kwargs)
File "/projects/tir1/users/cmalaviy/anaconda2/lib/python2.7/site-packages/theano/scan_module/scan_op.py", line 578, in make_node
inner_sitsot_out.type.ndim))
ValueError: When compiling the inner function of scan (the function called by scan in each of its iterations) the following error has been encountered: The initial state (`outputs_info` in scan nomenclature) of variable IncSubtensor{Set;:int64:}.0 (argument number 4) has 4 dimension(s), while the corresponding variable in the result of the inner function of scan (`fn`) has 1 dimension(s) (it should be one less than the initial state). For example, if the inner function of scan returns a vector of size d and scan uses the values of the previous time-step, then the initial state in scan should be a matrix of shape (1, d). The first dimension of this matrix corresponds to the number of previous time-steps that scan uses in each of its iterations. In order to solve this issue if the two varialbe currently have the same dimensionality, you can increase the dimensionality of the variable in the initial state of scan by using dimshuffle or shape_padleft.
Would appreciate any help.
Thanks!
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.