Spaces:
Running
Running
correct bug
Browse files- modules/toXML.py +6 -0
- modules/train.py +1 -1
modules/toXML.py
CHANGED
@@ -434,6 +434,12 @@ def create_BPMN_id(labels, pool_dict):
|
|
434 |
Returns:
|
435 |
tuple: List of BPMN IDs and updated pool dictionary.
|
436 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
BPMN_id = [class_dict[labels[i]] for i in range(len(labels))]
|
438 |
|
439 |
data_counter = 1
|
|
|
434 |
Returns:
|
435 |
tuple: List of BPMN IDs and updated pool dictionary.
|
436 |
"""
|
437 |
+
|
438 |
+
#change the label to task if it's subProcess
|
439 |
+
for i in range(len(labels)):
|
440 |
+
if labels[i] == list(class_dict.values()).index('subProcess'):
|
441 |
+
labels[i] = list(class_dict.values()).index('task')
|
442 |
+
|
443 |
BPMN_id = [class_dict[labels[i]] for i in range(len(labels))]
|
444 |
|
445 |
data_counter = 1
|
modules/train.py
CHANGED
@@ -95,7 +95,7 @@ def prepare_model(dict, opti, learning_rate=0.0003, model_to_load=None, model_ty
|
|
95 |
if opti == 'SGD':
|
96 |
optimizer = SGD(model.parameters(), lr=learning_rate, momentum=0.9, weight_decay=0.0001)
|
97 |
elif opti == 'Adam':
|
98 |
-
optimizer = AdamW(model.parameters(), lr=learning_rate, weight_decay=0.
|
99 |
else:
|
100 |
print('Optimizer not found')
|
101 |
|
|
|
95 |
if opti == 'SGD':
|
96 |
optimizer = SGD(model.parameters(), lr=learning_rate, momentum=0.9, weight_decay=0.0001)
|
97 |
elif opti == 'Adam':
|
98 |
+
optimizer = AdamW(model.parameters(), lr=learning_rate, weight_decay=0.001, eps=1e-08, betas=(0.9, 0.999))
|
99 |
else:
|
100 |
print('Optimizer not found')
|
101 |
|