Skip to content

Is it possible to extract embeddings? #33

Answered by LukasZahradnik
abtawfik asked this question in Q&A
Discussion options

You must be logged in to vote

Hello. Yes, it should be possible to extract all learnable parameters using the state_dict method on your model or evaluator (evaluator.state_dict()).

I realized it might be better to give it a more apparent name, so in the new version (0.1.7) that I just released, there is an alias parameters for state_dict (evaluator.parameters()) as well as fixed retrieving parameter values of one specific type - might be good to update your version.

With the state_dict/parameters method, you will get a dictionary with keys "weights" (which contains actual parameters' values) and "weight_names".

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@abtawfik
Comment options

@LukasZahradnik
Comment options

Answer selected by LukasZahradnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants