Commit 55933f62 authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Remove unused files

parent da697be5
%% Cell type:markdown id: tags:
### Set Path
%% Cell type:code id: tags:
``` python
%reload_ext autoreload
%autoreload 2
#PATH = '/home/dsalvalai/projects/networks_dami'
import os
PATH = os.getcwd()
print(PATH)
```
%% Output
/home/dsalvalai/projects/networks_dami
%% Cell type:markdown id: tags:
TRANSFER LEARNING from Tstage to LOCOREGIONAL EXPERIMENT RESPECTING COHORTS .
***
WATCH OUT: you have to modify also networks.py ( n_class=4 ) instead of 2
***
TRAINING COHORTS : HGJ & CHUS
%% Cell type:markdown id: tags:
### Import packages
%% Cell type:code id: tags:
``` python
import sys
import torch
import pickle
from torch.utils.data import DataLoader
import torch.nn as nn
import numpy as np
import os
from networks import Ciompi
from dataset import NumpyCSVDataset
from sklearn.metrics import matthews_corrcoef as mcor, accuracy_score as acc, recall_score as recall, precision_score as precision
```
%% Cell type:code id: tags:
``` python
os.environ["CUDA_VISIBLE_DEVICES"] = "0,1"
#os.environ["CUDA_VISIBLE_DEVICES"] = "2,3"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
```
%% Cell type:code id: tags:
``` python
DATASETDIR = f"{PATH}/data/processed/bbox_fixed2_augmented"
EXPERIMENT_DIR = f"{PATH}/experiments"
```
%% Cell type:markdown id: tags:
### Settings
%% Cell type:code id: tags:
``` python
EXPERIMENT_NAME = 'cohortsTstage-augm'
settings = {
'model': Ciompi,
'batch_size': 32,
'lr': 1e-4,
'epochs': 100,
'optim': torch.optim.Adam,
'K': 0.25,
'n_classes': 4, #TSTAGE
'seed': 1234
}
os.makedirs(f'{EXPERIMENT_DIR}/{EXPERIMENT_NAME}', exist_ok=False)
```
%% Cell type:code id: tags:
``` python
MODEL = settings['model']
BATCH_SIZE = settings['batch_size']
LR = settings['lr']
EPOCHS = settings['epochs']
OPTIMIZER = settings['optim']
K = settings['K']
N_CLASSES = settings['n_classes']
SEED = settings['seed']
```
%% Cell type:markdown id: tags:
### Data Handlers
%% Cell type:markdown id: tags: