From 2f5a8f4ab0e3d87f6f4b3a8cb585e0f3e947a797 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Wed, 8 May 2024 11:55:47 -0700 Subject: [PATCH] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f8bcd93f8..0651f0873 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ from PIL import Image import open_clip model, _, preprocess = open_clip.create_model_and_transforms('ViT-B-32', pretrained='laion2b_s34b_b79k') +model.eval() # model in train mode by default, impacts some models with BatchNorm or stochastic depth active tokenizer = open_clip.get_tokenizer('ViT-B-32') image = preprocess(Image.open("docs/CLIP.png")).unsqueeze(0)