Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRF head [WIP] #393

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Oct 22, 2019

  1. Start CRF layer work

    Want to try and add a new CRF layer for sequence tagging / prediction,
    and will implement Viterbi decoding and NLL as the loss value.
    singularperturbation committed Oct 22, 2019
    Configuration menu
    Copy the full SHA
    b4f6825 View commit details
    Browse the repository at this point in the history
  2. Add initializer function for transitions matrix

    There is some logic needed to properly create the transitions matrix, so
    add an initializer function using range + xavier uniform, and disallow
    Any -> BOS or EOS -> Any transitions.
    singularperturbation committed Oct 22, 2019
    Configuration menu
    Copy the full SHA
    177846d View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2019

  1. Start CRF internal functions

    Following other implementations, will do scores + log partition function
    for the forward pass (getting NLL).
    singularperturbation committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    c0c8ccd View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2019

  1. Add index_select with passed-in storage

    Uses array passed in and only reshapes if needed (the new Tensor has a
    larger size than the old one).  Needed / think should help when doing
    index_select with each subset of the same size.
    
    Example here is selecting batch_size for each time step in CRF
    emissions.
    singularperturbation committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    7f8a272 View commit details
    Browse the repository at this point in the history
  2. Formatting and some API changes

    Ran 'nimpretty' to clean up formatting / long lines, and passed more
    information to the nnp_crf functions.
    singularperturbation committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    692c7d3 View commit details
    Browse the repository at this point in the history
  3. Bug fixes

    singularperturbation committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    1c597a4 View commit details
    Browse the repository at this point in the history
  4. Start on crf_forward

    Implementation of forward pass underway, starting with scores (non
    normalized log prob with emission + transition components).
    singularperturbation committed Oct 24, 2019
    Configuration menu
    Copy the full SHA
    1db105e View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2019

  1. Update CRF

    Fix some bugs with CRF non-normalized score calculation (mostly making
    sure that not returning matrix when shouldn't when using index_select).
    
    Also fix some out-of-bounds bug due to loop over time steps.
    singularperturbation committed Oct 29, 2019
    Configuration menu
    Copy the full SHA
    e618061 View commit details
    Browse the repository at this point in the history