Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Sparsification for CRF transition matrix #982

Closed

Conversation

psuzhanhy
Copy link
Contributor

Summary:

  1. added sparsification support for CRF. Two sparsification methods are supported a) l1-regularization via soft-thresholding method to update the transition matrix
    b) magnitude-based, which keeps top elements in each column of the transition matrix until sparsity is met.

  2. small refactoring on how sparsifier is called in trainer.py. Sparsifier in effect only after a step if sparsification_condition returns true.

Differential Revision: D17408540

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 16, 2019
psuzhanhy added a commit to psuzhanhy/pytext that referenced this pull request Sep 21, 2019
Summary:
Pull Request resolved: facebookresearch#982

1. added sparsification support for CRF. Two sparsification methods are supported a) l1-regularization via soft-thresholding method to update the transition matrix
b) magnitude-based, which keeps top elements in each column of the transition matrix until sparsity is met.

2. small refactoring on how sparsifier is called in trainer.py. Sparsifier in effect only after a step if sparsification_condition returns true.

Differential Revision: D17408540

fbshipit-source-id: 482607c0b23af12cab53d58c7361d3ef6eb5b6d8
psuzhanhy added a commit to psuzhanhy/pytext that referenced this pull request Sep 21, 2019
Summary:
Pull Request resolved: facebookresearch#982

1. added sparsification support for CRF. Two sparsification methods are supported a) l1-regularization via soft-thresholding method to update the transition matrix
b) magnitude-based, which keeps top elements in each column of the transition matrix until sparsity is met.

2. small refactoring on how sparsifier is called in trainer.py. Sparsifier in effect only after a step if sparsification_condition returns true.

Differential Revision: D17408540

fbshipit-source-id: 51841aa6312c6b78c85979d050e0fed02363129f
@psuzhanhy psuzhanhy force-pushed the export-D17408540 branch 2 times, most recently from 4fca0d1 to 758d6ee Compare September 23, 2019 17:21
psuzhanhy added a commit to psuzhanhy/pytext that referenced this pull request Sep 23, 2019
Summary:
Pull Request resolved: facebookresearch#982

1. added sparsification support for CRF. Two sparsification methods are supported a) l1-regularization via soft-thresholding method to update the transition matrix
b) magnitude-based, which keeps top elements in each column of the transition matrix until sparsity is met.

2. small refactoring on how sparsifier is called in trainer.py. Sparsifier in effect only after a step if sparsification_condition returns true.

Differential Revision: D17408540

fbshipit-source-id: db2f6dadbe300ea979cf1d0166fa6556c6a50c39
Summary:
Pull Request resolved: facebookresearch#982

1. added sparsification support for CRF. Two sparsification methods are supported a) l1-regularization via soft-thresholding method to update the transition matrix
b) magnitude-based, which keeps top elements in each column of the transition matrix until sparsity is met.

2. small refactoring on how sparsifier is called in trainer.py. Sparsifier in effect only after a step if sparsification_condition returns true.

Reviewed By: arbabu123

Differential Revision: D17408540

fbshipit-source-id: c7a448b68f21fe9759971558bc88f21159ca7485
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in c7dd752.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants