Closed siamakzd closed 1 year ago
Hi @siamakzd take a look our embedding extraction pipeline in deepsparse: https://github.com/neuralmagic/deepsparse/blob/main/src/deepsparse/pipelines/embedding_extraction.py
after identifying the name of a node in onnx you would like to extract the features from, you could accomplish this with
from deepsparse import Pipeline
feature_extractor = Pipeline.create(
task="embedding-extraction",
base_task="image-classification",
model_path="zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95-none",
emb_extraction_layer=<NAME OF NODE TO EXTRACT>,
)
Hello @siamakzd We have not heard a response on this issue and will close this one out. If you would like to continue the conversation, please re-open it. Thank you!
Jeannie / Neural Magic
Hello,
Thank you for the great library! I have a simple use case but I can't figure out how to achieve it. I want to use one of the pertained and pruned models on SparseZoo and use it as a feature extractor in my pipeline (no extra fine-tuning or pruning).
More specifically, I want to:
zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95-none
,Is this possible? If yes, I will appreciate any pointers to the relevant documentations.
Thank you!