Giter Club home page Giter Club logo

Comments (2)

onceupon avatar onceupon commented on September 25, 2024 1

i met the same problem using the docker image, with Python 2.7.6.
But seems to be solved by editing the file Basset/src/seq_hdf5.py, line 81-89,
adding int() to test_count, train_count and valid_count

    train_count = seqs.shape[0] - test_count - valid_count
    train_count = int(batch_round(train_count, options.batch_size))
    print >> sys.stderr, '%d training sequences ' % train_count
 
    test_count = int(batch_round(test_count, options.batch_size))
    print >> sys.stderr, '%d test sequences ' % test_count
 
    valid_count = int(batch_round(valid_count, options.batch_size))
    print >> sys.stderr, '%d validation sequences ' % valid_count

from basset.

CesarArenas-Mena avatar CesarArenas-Mena commented on September 25, 2024

I guess the error in line 92 of current seq_hdf5.py while running python 2.7.5 is related. Onceupon, could your request a pull?

[ca445@cbsugpu01 bassetfiles]$ python /usr/local/Basset-0.1.0/src/seq_hdf5.py -r -c -v 3000 -t 3000 learn_cd4.fa lt.txt learn_cd4.h5
85261 training sequences
3000 test sequences
3000 validation sequences
Traceback (most recent call last):
  File "/usr/local/Basset-0.1.0/src/seq_hdf5.py", line 130, in <module>
    main()
  File "/usr/local/Basset-0.1.0/src/seq_hdf5.py", line 92, in main
    train_seqs, train_targets = seqs[i:i+train_count,:], targets[i:i+train_count,:]
TypeError: slice indices must be integers or None or have an __index__ method

from basset.

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.