Spaces:
Running
Running
yjwtheonly
commited on
Commit
·
f4725ed
1
Parent(s):
9da7dfe
modification
Browse files
server.py
CHANGED
@@ -478,6 +478,9 @@ sorted_rank['merged'] = sorted_rank['merged'][llen * 3 // 4 : ]
|
|
478 |
|
479 |
def generate_specific_attack_edge(start_entity, end_entity):
|
480 |
|
|
|
|
|
|
|
481 |
global specific_model
|
482 |
|
483 |
specific_model.to(device)
|
|
|
478 |
|
479 |
def generate_specific_attack_edge(start_entity, end_entity):
|
480 |
|
481 |
+
if device == 'cpu':
|
482 |
+
print('We can just set the malicious link equals to the target link, since the generation of malicious link is too slow on cpu')
|
483 |
+
return start_entity, '10', end_entity
|
484 |
global specific_model
|
485 |
|
486 |
specific_model.to(device)
|