Tim77777767
commited on
Commit
·
3e467ea
1
Parent(s):
f579dfb
Anpassungen modelpath
Browse files- preTrainedTest.py +4 -3
preTrainedTest.py
CHANGED
@@ -12,11 +12,12 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
12 |
print(f"Using device: {device}")
|
13 |
|
14 |
# Modell laden
|
15 |
-
|
16 |
print("Starte config_load")
|
17 |
-
config = MySegformerConfig.from_pretrained(
|
18 |
print("Starte Model_load")
|
19 |
-
|
|
|
20 |
model.to(device).eval()
|
21 |
|
22 |
# Bild laden
|
|
|
12 |
print(f"Using device: {device}")
|
13 |
|
14 |
# Modell laden
|
15 |
+
config_path = "TimM77/SegformerPlusPlus"
|
16 |
print("Starte config_load")
|
17 |
+
config = MySegformerConfig.from_pretrained(config_path)
|
18 |
print("Starte Model_load")
|
19 |
+
model_path = "TimM77/SegformerPlusPlus/pytorch_model.bin"
|
20 |
+
model = MySegformerForSemanticSegmentation.from_pretrained(model_path, config=config)
|
21 |
model.to(device).eval()
|
22 |
|
23 |
# Bild laden
|