danielhshi8224 commited on
Commit ·
aa94099
1
Parent(s): 5c9eb89
fix model nesting
Browse files
convnext-tiny-224-7cls/config.json → config.json
RENAMED
|
File without changes
|
convnext-tiny-224-7cls/model.safetensors → model.safetensors
RENAMED
|
File without changes
|
convnext-tiny-224-7cls/preprocessor_config.json → preprocessor_config.json
RENAMED
|
File without changes
|
testmodel.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import AutoModelForImageClassification, AutoImageProcessor
|
| 2 |
+
m = AutoModelForImageClassification.from_pretrained("dshi01/my-benthic-classifier/convnext-tiny-224-7cls")
|
| 3 |
+
p = AutoImageProcessor.from_pretrained("dshi01/my-benthic-classifier/convnext-tiny-224-7cls")
|
| 4 |
+
print(m.config.model_type, m.config.num_labels) # expect convnext, 7 (if set)
|