Git Product home page Git Product logo

nmt-coverage's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nmt-coverage's Issues

sample.py时报错

你好,

我在运行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

2017-03-28 11 51 31

Theano scan error while training model

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.