Skip to content

Add compilable by torchscript version of crf module#4

Open
Kemsekov wants to merge 4 commits intomishgon:masterfrom
Kemsekov:master
Open

Add compilable by torchscript version of crf module#4
Kemsekov wants to merge 4 commits intomishgon:masterfrom
Kemsekov:master

Conversation

@Kemsekov
Copy link

@Kemsekov Kemsekov commented Dec 19, 2024

I wasn't able to compile my model in torchscript after i added crf module as head, so i altered a bit original class and was able to compile it.

I removed tqdm from model so torchscript can compile (it cannot handle try catch inside of display tqdm invocation), and replaced numpy operations with torch operations, because torchscript compiler don't know how to use numpy.

All other parts are mostly the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant