ChanLumerico commited on
Commit
6c6c9c9
·
verified ·
1 Parent(s): 051b904

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
@@ -34,17 +34,17 @@ converted to Lucid-native safetensors.
34
 
35
  ```python
36
  import lucid.models as models
37
- from lucid.models.vision.resnet import EfficientformerL7Weights
38
 
39
  # default tag
40
  model = models.efficientformer_l7_cls(pretrained=True)
41
 
42
  # explicit tag (enum or string)
43
- model = models.efficientformer_l7_cls(weights=EfficientformerL7Weights.SNAP_DIST_IN1K)
44
  model = models.efficientformer_l7_cls(pretrained="SNAP_DIST_IN1K")
45
 
46
  # preprocessing travels with the weights
47
- weights = EfficientformerL7Weights.SNAP_DIST_IN1K
48
  preprocess = weights.transforms()
49
  logits = model(preprocess(image)[None]).logits
50
  ```
 
34
 
35
  ```python
36
  import lucid.models as models
37
+ from lucid.models.weights import EfficientFormerL7Weights
38
 
39
  # default tag
40
  model = models.efficientformer_l7_cls(pretrained=True)
41
 
42
  # explicit tag (enum or string)
43
+ model = models.efficientformer_l7_cls(weights=EfficientFormerL7Weights.SNAP_DIST_IN1K)
44
  model = models.efficientformer_l7_cls(pretrained="SNAP_DIST_IN1K")
45
 
46
  # preprocessing travels with the weights
47
+ weights = EfficientFormerL7Weights.SNAP_DIST_IN1K
48
  preprocess = weights.transforms()
49
  logits = model(preprocess(image)[None]).logits
50
  ```