crf beam search
Project description
crf-beam
Beam search for Bonito CRF models.
Usage
>>> import torch
>>> from crf_beam import beam_search
>>>
>>> T, C, S = 1000, 320, 64
>>> scores = torch.rand(T, C)
>>> back_guides = torch.rand(T + 1, S)
>>> post = torch.rand(T, S)
>>>
>>> sequence, qstring, moves = beam_search(scores, back_guides, post)
>>> sequence
'ACACTCGCAGCGCGATACGACTGATCGAGATATACTCAGTGTACACAGT...'
>>> qstring
'(&''(****95444"@732"55",--/5555"5"@@E"E4""","-#**...'
Developer Quickstart
Python
$ python3 -m venv venv3
$ source venv3/bin/activate
(venv3) $ pip install -r requirements.txt
(venv3) $ make build
(venv3) $ make test
WASM
$ make wasm
$ node tests/test.js
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
File details
Details for the file crf_beam-0.1.9-cp311-cp311-manylinux2014_x86_64.whl
.
File metadata
- Download URL: crf_beam-0.1.9-cp311-cp311-manylinux2014_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.11
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44fce62152b04099ec6b58d191d416b2cdce32f1207866b31cb6b4ce7b211e82 |
|
MD5 | 94689f00fe1d04fddc551edb2fac76e1 |
|
BLAKE2b-256 | 0696726b99dc1ce2d529ecfca03e222c1c51b73050c706879a976434c6c98fe1 |
File details
Details for the file crf_beam-0.1.9-cp310-cp310-manylinux2014_x86_64.whl
.
File metadata
- Download URL: crf_beam-0.1.9-cp310-cp310-manylinux2014_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.10
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99b1b093c86c6b1520604f5639d723c3adf1d2e5f519e3ceb882a58f9c7e34eb |
|
MD5 | 5b8e5bb1e00f885b7bb67166952e95bb |
|
BLAKE2b-256 | 01e521ad7726697c64fa03d35d655b3ae34eb5955fd646894023febf59802897 |
File details
Details for the file crf_beam-0.1.9-cp39-cp39-manylinux2014_x86_64.whl
.
File metadata
- Download URL: crf_beam-0.1.9-cp39-cp39-manylinux2014_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.9
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5505820db9687778d4d588b9ba4df851358b904f180170f11e3ecd157496aee5 |
|
MD5 | 4d03457111fc9ae94e748b96ee464e78 |
|
BLAKE2b-256 | 8e44382ab76e8c210065558a614586df07e5c4849fb5ba76c41bdea6d960a674 |
File details
Details for the file crf_beam-0.1.9-cp38-cp38-manylinux2014_x86_64.whl
.
File metadata
- Download URL: crf_beam-0.1.9-cp38-cp38-manylinux2014_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 643f9bd52e7fd4329119818e455162beab3e9e5a4b5fa51d796924fb85063953 |
|
MD5 | d7749994f84e223760412831e4661ea5 |
|
BLAKE2b-256 | 79f399fc7deddf8e38f97a7468f7a6a977cc24be9a36aa100ca5b602b0e9ea1c |