Browse Source

feat: add main files

main
Taha Mohammadzadeh 11 months ago
parent
commit
d094fd4419
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      main.py

+ 1
- 3
main.py View File

- history (dict): Dictionary containing evaluation metrics for each run. - history (dict): Dictionary containing evaluation metrics for each run.
""" """
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
print(torch.cuda.is_available())
torch.zeros(1).cuda()
# Step 1: Initialize a dictionary to store evaluation metrics # Step 1: Initialize a dictionary to store evaluation metrics
history = {'AUC': [], 'AUPRC': [], "Accuracy": [], "Precision": [], "Recall": [], "F1 score": []} history = {'AUC': [], 'AUPRC': [], "Accuracy": [], "Precision": [], "Recall": [], "F1 score": []}


torch.manual_seed(RANDOM_SEED) torch.manual_seed(RANDOM_SEED)
random.seed(RANDOM_SEED) random.seed(RANDOM_SEED)
np.random.seed(RANDOM_SEED) np.random.seed(RANDOM_SEED)
run(10, is_test=True)
run(10, is_test=False)

Loading…
Cancel
Save