Code Monkey home page Code Monkey logo

Comments (3)

kolloldas avatar kolloldas commented on June 7, 2024

Sorry missed this. Are you having trouble running it on PyTorch 0.3.0? Seems to work fine on my system. The minimum required version is 0.2.0 but should run fine on the latest version. I'll check on 0.4.0 and update this thread.

from torchnlp.

djstrong avatar djstrong commented on June 7, 2024

There are problems with pytorch 0.4 and cuda.

_________________________________________________________________________________________ test_softmax_output_layer _________________________________________________________________________________________

    def test_softmax_output_layer():
        hidden = Variable(torch.randn(2, 3, 4))
        labels = Variable(torch.ones(2, 3).long())
        softmax = SoftmaxOutputLayer(4, 8)
        loss = softmax.loss(hidden, labels)
>       assert loss.shape[0] == 1
E       IndexError: tuple index out of range

../../../../../../repos/torchnlp/tests/modules/test_outputs.py:12: IndexError
___________________________________________________________________________________________ test_crf_output_layer ___________________________________________________________________________________________

    def test_crf_output_layer():
        hidden = Variable(torch.randn(2, 3, 4))
        labels = Variable(torch.ones(2, 3).long())
        crf = CRFOutputLayer(4, 8)
        loss = crf.loss(hidden, labels)
>       assert loss.shape[0] == 1
E       IndexError: tuple index out of range

../../../../../../repos/torchnlp/tests/modules/test_outputs.py:21: IndexError

from torchnlp.

kolloldas avatar kolloldas commented on June 7, 2024

@djstrong Thanks for pointing that out! I have just migrated the library to use Pytorch 0.4.0. All tests are passing now and I was able to train the CoNLL2000 dataset on a GPU without issues. Please give it a try and let me know if you still find problems.

from torchnlp.

Related Issues (15)

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.