Giter VIP home page Giter VIP logo

Comments (4)

XuhanLiu avatar XuhanLiu commented on August 17, 2024 2

Thanks for reminding me this bug. It is caused by the duplication of 'EOS' in vocabulary defined in the file of 'voc.txt'. I have modified the 'util.py' and removed the 'EOS' defined in token sequences. If you do not want to regenerate the corpus, you can simply remove 'EOS' in the file of 'voc.txt'

from drugex.

XuhanLiu avatar XuhanLiu commented on August 17, 2024

I checked this part of code in my own machine (PyTorch = 1.0 or 1.3 stable), but I did not find such a bug. Could you tell me the version of PyTorch?

from drugex.

Auroraywood avatar Auroraywood commented on August 17, 2024

Thank you very much! The version of my pytorch is higher and I have alreadly figure the problem out! But now, I have met another error, when I train prior model on the data zinc_corpus.txt, it occurs keyerror when encode, so I modify voc = util.Voc("data/voc.txt") to voc = util.Voc("data/zinc_voc.txt"), then keyerror in encode disappeared, but now decode occurs keyerror again, this time I am confused.

Traceback (most recent call last):
  File "pretrainer.py", line 60, in <module>
    main()
  File "pretrainer.py", line 27, in main
    prior.fit(zinc, out=netP_path)
  File "/home/tensorflow/DrugEx/model.py", line 428, in fit
    smiles, valids = util.check_smiles(seqs, self.voc)
  File "/home/tensorflow/DrugEx/util.py", line 232, in check_smiles
    smile = voc.decode(seq)
  File "/home/tensorflow/DrugEx/util.py", line 94, in decode
    chars.append(self.ix2tk[i])
KeyError: 0

from drugex.

Auroraywood avatar Auroraywood commented on August 17, 2024

Thank you very much.

from drugex.

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.