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

Commit

Permalink
ImageEmbedder Docs: Fix print and remove embedding_dim usage (#665)
Browse files Browse the repository at this point in the history
* fix prints, remove embedding_dim

* undo example since print is fine there

Co-authored-by: Ananya Harsh Jha <[email protected]>
  • Loading branch information
tszumowski and ananyahjha93 authored Aug 16, 2021
1 parent c40f384 commit 2f07c63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ from flash.image import ImageEmbedder
download_data("https://pl-flash-data.s3.amazonaws.com/hymenoptera_data.zip", "data/")

# 2. Create an ImageEmbedder with resnet50 trained on imagenet.
embedder = ImageEmbedder(backbone="resnet50", embedding_dim=128)
embedder = ImageEmbedder(backbone="resnet50")

# 3. Generate an embedding from an image path.
embeddings = embedder.predict("data/hymenoptera_data/predict/153783656_85f9c3ac70.jpg")

# 4. Print embeddings shape
print(embeddings.shape)
print(embeddings[0].shape)
```

</details>
Expand Down
2 changes: 1 addition & 1 deletion flash_examples/integrations/fiftyone/image_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
)

# 3 Load model
embedder = ImageEmbedder(backbone="resnet101", embedding_dim=128)
embedder = ImageEmbedder(backbone="resnet101")

# 4 Generate embeddings
filepaths = dataset.values("filepath")
Expand Down

0 comments on commit 2f07c63

Please sign in to comment.