ChanLumerico commited on
Commit
1d62e06
·
verified ·
1 Parent(s): 9a3ce0c

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