ChanLumerico commited on
Commit
f999f4e
·
verified ·
1 Parent(s): 0d2cf22

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 MaxvitTinyWeights
39
 
40
  # default tag
41
  model = models.maxvit_tiny_cls(pretrained=True)
42
 
43
  # explicit tag (enum or string)
44
- model = models.maxvit_tiny_cls(weights=MaxvitTinyWeights.IN1K)
45
  model = models.maxvit_tiny_cls(pretrained="IN1K")
46
 
47
  # preprocessing travels with the weights
48
- weights = MaxvitTinyWeights.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 MaxViTTinyWeights
39
 
40
  # default tag
41
  model = models.maxvit_tiny_cls(pretrained=True)
42
 
43
  # explicit tag (enum or string)
44
+ model = models.maxvit_tiny_cls(weights=MaxViTTinyWeights.IN1K)
45
  model = models.maxvit_tiny_cls(pretrained="IN1K")
46
 
47
  # preprocessing travels with the weights
48
+ weights = MaxViTTinyWeights.IN1K
49
  preprocess = weights.transforms()
50
  logits = model(preprocess(image)[None]).logits
51
  ```