Code Monkey home page Code Monkey logo

dl4nmt_theano's People

Contributors

fyabc avatar ngchc avatar renqianluo avatar ustctf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dl4nmt_theano's Issues

Code Bug in LSTM & GRU layers

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.

Some Code Bugs

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.

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.