Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Cluster #36

Merged
merged 20 commits into from
Feb 1, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/source/reference/image_embedder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Use the :class:`~flash.vision.ImageEmbedder` pretrained model for inference on a
from flash.vision import ImageEmbedder

# Load finetuned task
embedder = ImageEmbedder(backbone='swav-imagenet')
embedder = ImageEmbedder(backbone='resnet18')

# 2. Perform inference on an image file
embeddings = model.predict('path/to/image.png')
Expand All @@ -36,6 +36,8 @@ Or on a random image tensor

.. testcode:: python

import torch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentation


# 2. Perform inference on an image file
images = torch.rand(32, 3, 224, 224)
embeddings = model.predict(images)
tchaton marked this conversation as resolved.
Show resolved Hide resolved
Expand Down