Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return logits #1102

Closed
wants to merge 20 commits into from
Closed

return logits #1102

wants to merge 20 commits into from

Conversation

mwitiderrick
Copy link
Contributor

No description provided.

@mwitiderrick
Copy link
Contributor Author

from deepsparse import Pipeline
cv_pipeline = Pipeline.create(
  task='image_classification',
  model_path='zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95-none',  # Path to checkpoint or SparseZoo stub
  top_k=3,
  return_logits = True,
)
input_image = "cheetah.jpeg" # path to input image
inference = cv_pipeline(images=input_image)
inference

# ImageClassificationOutput(labels=None, scores=None, logits=array([[ 1.8277559 ,  4.486894  ,  2.4551017 ,  4.777242  ,  # 2.744733  ,.... 8.45131   ]],
 #     dtype=float32))

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