ChanLumerico commited on
Commit
3955faf
·
verified ·
1 Parent(s): 47f6d35

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