GithubHelp home page GithubHelp logo

list index out of range about nmt_gan HOT 2 OPEN

SunXiaoqian1 avatar SunXiaoqian1 commented on May 27, 2024
list index out of range

from nmt_gan.

Comments (2)

swordlin avatar swordlin commented on May 27, 2024

When using a dictionary generated by BPE-processed data, the following error occurred, but there is no problem when using a dictionary generated from data that has not been processed by BPE, how should I modify it?

Traceback (most recent call last):
File "train.py", line 83, in
train(config)
File "train.py", line 18, in train
du.load_vocab()
File "/home/sxq/NMT_GAN-master/utils.py", line 56, in load_vocab
self.src2idx, self.idx2src = load_vocab_(self.config.src_vocab, self.config.src_vocab_size)
File "/home/sxq/NMT_GAN-master/utils.py", line 43, in load_vocab_
vocab = [line.split()[0] for line in codecs.open(path, 'r', 'utf-8')]
IndexError: list index out of range

Looking forward to your reply.

Sorry to bother you,I want to know how you got those BPE-processed datas,by Sennrich‘s subword-nmt?If so,how do you map the generated files to the file paths in these yamls? For example,I have no idea how this file named “target.bpe.txt.vocab.34432” came from.
I would appreciate to receive your reply.

from nmt_gan.

BOBOWEI2 avatar BOBOWEI2 commented on May 27, 2024

同问。。。。

from nmt_gan.

Related Issues (20)

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.