Giter VIP home page Giter VIP logo

dsgsum's People

Contributors

martin6336 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dsgsum's Issues

KeyError: 'tgt'

The data has been preprocessed, run train.py, this error occurs:
Traceback (most recent call last):
File "/home/mist/src/train.py", line 140, in
train_abs(args, device_id)
File "/home/mist/src/train_abstractive.py", line 276, in train_abs
train_abs_single(args, device_id)
File "/home/mist/src/train_abstractive.py", line 339, in train_abs_single
trainer.train(train_iter_fct, args.train_steps, device_id)
File "/home/mist/src/models/trainer.py", line 145, in train
for i, batch in enumerate(train_iter):
File "/home/mist/src/models/data_loader.py", line 205, in iter
for batch in self.cur_iter:
File "/home/mist/src/models/data_loader.py", line 363, in iter
for idx, minibatch in enumerate(self.batches):
File "/home/mist/src/models/data_loader.py", line 343, in create_batches
for buffer in self.batch_buffer(data, self.batch_size * 300):
File "/home/mist/src/models/data_loader.py", line 311, in batch_buffer
ex = self.preprocess(ex, self.is_test)
File "/home/mist/src/models/data_loader.py", line 256, in preprocess
tgt = ex['tgt'][:self.args.max_tgt_len][:-1]+[2]
KeyError: 'tgt'

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.