oalieno / asm2vec-pytorch

Unofficial implementation of asm2vec using pytorch ( with GPU acceleration )
MIT License
74 stars 21 forks source link

obtaining function vector #5

Closed markgllin closed 3 years ago

markgllin commented 3 years ago

from the readme:

python scripts/test.py -i asm/123456 -m model.pt

After you train your model, try to grab a assembly function and see the result. This script will show you how the model perform. Once you satisfied, you can take out the embedding vector of the function and do whatever you want with it.

from my testing, test.py appears to return predictions for instruction embeddings for the function(s) passed in, and not predictions for function embedding itself. How do we obtain function vectors for further use?

markgllin commented 3 years ago

was too hasty in creating this issue! found it literally a second later: https://github.com/oalieno/asm2vec-pytorch/blob/master/scripts/compare.py#L31