An image embedding operator generates a vector given an image.
This operator extracts features for image with pretrained [SWAG](https://github.com/facebookresearch/SWAG) models from [Torch Hub](https://pytorch.org/docs/stable/hub.html).
SWAG implements models from the paper [Revisiting Weakly Supervised Pre-Training of Visual Perception Models](https://arxiv.org/abs/2201.08371).
To achieve higher accuracy in image classification, SWAG uses hashtags to perform weakly supervised learning instead of fully supervised pretraining with image class labels.
<br/>
## Code Example
Load an image from path './towhee.jpg'
and use the pretrained SWAG model 'vit_b16_in1k' to generate an image embedding.