Update README.md
Browse files
README.md
CHANGED
|
@@ -70,16 +70,15 @@ weights_path = hf_hub_download(
|
|
| 70 |
filename="model.safetensors"
|
| 71 |
)
|
| 72 |
|
| 73 |
-
from safetensors.torch import
|
| 74 |
|
| 75 |
model = EfficientNetSkinLesionClassifier()
|
| 76 |
-
|
| 77 |
-
model.load_state_dict(state, strict=True)
|
| 78 |
-
|
| 79 |
-
model.eval() # Set model to evaluation mode
|
| 80 |
|
| 81 |
model.to(device) # Don't forget to put on GPU
|
| 82 |
|
|
|
|
|
|
|
| 83 |
|
| 84 |
# Example with PH2 Dataset
|
| 85 |
|
|
|
|
| 70 |
filename="model.safetensors"
|
| 71 |
)
|
| 72 |
|
| 73 |
+
from safetensors.torch import load_model
|
| 74 |
|
| 75 |
model = EfficientNetSkinLesionClassifier()
|
| 76 |
+
load_model(model, filename=weights_path, strict=True)
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
model.to(device) # Don't forget to put on GPU
|
| 79 |
|
| 80 |
+
model.eval() # Set model to evaluation mode
|
| 81 |
+
|
| 82 |
|
| 83 |
# Example with PH2 Dataset
|
| 84 |
|