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

Commit

Permalink
minor fixes for image embedder (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikb11 authored Feb 12, 2021
1 parent 865869e commit a4952da
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/source/reference/image_embedder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Use the :class:`~flash.vision.ImageEmbedder` pretrained model for inference on a
embedder = ImageEmbedder(backbone="resnet18")
# 2. Perform inference on an image file
embeddings = model.predict("path/to/image.png")
embeddings = embedder.predict("path/to/image.png")
print(embeddings)
Or on a random image tensor
Expand Down Expand Up @@ -91,13 +91,12 @@ By default, we use the encoder from `SwAV <https://arxiv.org/pdf/2006.09882.pdf>

.. note::

When changing the backbone, make sure you pass in the same backbone to the Task and the Data object!
When changing the backbone, make sure you pass in the same backbone to the Task!

.. code-block:: python
# 1. organize the data
data = ImageClassificationData.from_folders(
backbone="resnet34",
train_folder="data/hymenoptera_data/train/",
valid_folder="data/hymenoptera_data/val/"
)
Expand Down

0 comments on commit a4952da

Please sign in to comment.