Git Product home page Git Product logo

Comments (7)

kwalcock avatar kwalcock commented on July 26, 2024

I'm finally looking. Sorry for the delay.

from processors.

kwalcock avatar kwalcock commented on July 26, 2024

I wonder whether the scores are really necessary given that access isn't provided. So the hierarchy is

FinalLayer
  <- ForwardLayer
    <- GreedyForwardLayer
    <- ViterbiForwardLayer

and Greedy has it while Viterbi doesn't. It seems like there needs to be a Utils.viterbiWithScores for ViterbiForwardLayer.inferenceWithScores in the same way inference calls Utils.viterbi. That could probably be made by keeping track of backScores along with backPointers.

That probably doesn't answer your question. If you replace inferenceWithScore with just inference won't you lose the scores you are trying to locate? Is it loss() that you need instead?

from processors.

MihaiSurdeanu avatar MihaiSurdeanu commented on July 26, 2024

This one is on me. I implemented it for greedy inference, and did not implement it yet for Viterbi.
Haris, for now please change the inference type to greedy in the final layer, in the config file. It should work afterwards.

from processors.

hriaz17 avatar hriaz17 commented on July 26, 2024

I guess what I really need to return from the viterbi() method in Utils.scala is pathScore along with bestPath. That would involve minor modifications to viterbi() and inference() but this is a short term solution that won't return an IndexedSeq[IndexedSeq[(String, Float)] nested array as specified in the inferenceWithScores() method.

from processors.

hriaz17 avatar hriaz17 commented on July 26, 2024

This one is on me. I implemented it for greedy inference, and did not implement it yet for Viterbi. Haris, for now please change the inference type to greedy in the final layer, in the config file. It should work afterwards.

ok.

from processors.

kwalcock avatar kwalcock commented on July 26, 2024

@harisriaz17, keep in mind there is one viterbi in org.clulab.dynet.Utils. Perhaps in the end one version can be used for both the existing and the new case.

from processors.

kwalcock avatar kwalcock commented on July 26, 2024

Will this for sure be needed eventually, or is it contingent on things that might not happen? I.e., will implementing it now be potentially wasted effort?

from processors.

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.