Tim77777767
commited on
Commit
·
ee9d4b8
1
Parent(s):
3e467ea
Anpassungen preTrained
Browse files- preTrainedTest.py +3 -4
preTrainedTest.py
CHANGED
@@ -12,12 +12,11 @@ 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 = MySegformerForSemanticSegmentation.from_pretrained(model_path, config=config)
|
21 |
model.to(device).eval()
|
22 |
|
23 |
# Bild laden
|
|
|
12 |
print(f"Using device: {device}")
|
13 |
|
14 |
# Modell laden
|
15 |
+
model_name_or_path = "TimM77/SegformerPlusPlus"
|
16 |
print("Starte config_load")
|
17 |
+
config = MySegformerConfig.from_pretrained(model_name_or_path)
|
18 |
print("Starte Model_load")
|
19 |
+
model = MySegformerForSemanticSegmentation.from_pretrained(model_name_or_path, config=config)
|
|
|
20 |
model.to(device).eval()
|
21 |
|
22 |
# Bild laden
|