ChanLumerico commited on
Commit
07435ad
·
verified ·
1 Parent(s): 7bac007

Fix usage example: import weights enum from lucid.models.weights

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -35,17 +35,17 @@ converted to Lucid-native safetensors.
35
 
36
  ```python
37
  import lucid.models as models
38
- from lucid.models.vision.resnet import MaxvitSmallWeights
39
 
40
  # default tag
41
  model = models.maxvit_small_cls(pretrained=True)
42
 
43
  # explicit tag (enum or string)
44
- model = models.maxvit_small_cls(weights=MaxvitSmallWeights.IN1K)
45
  model = models.maxvit_small_cls(pretrained="IN1K")
46
 
47
  # preprocessing travels with the weights
48
- weights = MaxvitSmallWeights.IN1K
49
  preprocess = weights.transforms()
50
  logits = model(preprocess(image)[None]).logits
51
  ```
 
35
 
36
  ```python
37
  import lucid.models as models
38
+ from lucid.models.weights import MaxViTSmallWeights
39
 
40
  # default tag
41
  model = models.maxvit_small_cls(pretrained=True)
42
 
43
  # explicit tag (enum or string)
44
+ model = models.maxvit_small_cls(weights=MaxViTSmallWeights.IN1K)
45
  model = models.maxvit_small_cls(pretrained="IN1K")
46
 
47
  # preprocessing travels with the weights
48
+ weights = MaxViTSmallWeights.IN1K
49
  preprocess = weights.transforms()
50
  logits = model(preprocess(image)[None]).logits
51
  ```