cropped_size=o.opt.c_size, transform=False, input_images = [0,1,2]) #this and beat sum(120) are to use 120 long data set! #data = torch.utils.data.Subset(data, range(120)) #beat = [8708,900,2403] #beat = [90,10,20] #traindata, valdata, testdata = torch.utils.data.random_split(data, beat) octmodel = model.CapsNet(o.opt) octmodel.to(o.opt.device) if o.opt.loadcheckpoint: octmodel.load_state_dict(checkpoint['model_state_dict']) #these are only used im home testing, when randomsubset samplers are on in test and train!!! setsize={'train':range(100), 'val':range(20)} if o.opt.train: sys.stdout.write('Starting Training... ' + '\n' + '\n')
sys.stdout.write('Mean ' + str(1-np.mean(self.col_losses1)) + '\n' + \ 'Std ' + str(np.std(self.col_losses1)) + '\n' + \ 'Min ' +str(1-np.max(self.col_losses1)) + '\n' + \ 'Max ' + str(1-np.min(self.col_losses1)) + '\n') ''' data_dir = '/media/arjun/VascLab EVO/projects/oct_ca_seg/actual final data' #path to whichever model you want. usually will live in a ehckpoint checkpoint = torch.load( '/media/arjun/VascLab EVO/projects/oct_ca_seg/runsaves/Final1-pawsey/checkpoints/checkpoint.pt' ) #checkpoint = torch.load('/group/pawsey0271/abalaji/projects/oct_ca_seg/run_saves/Final1-pawsey/checkpoints/checkpoint.pt') model = m.CapsNet(o.opt) model.load_state_dict(checkpoint['model_state_dict']) model.to('cuda') #this should be the testsamples from your loaded model #testnames = os.listdir('/group/pawsey0271/abalaji/projects/oct_ca_seg/run_saves/Final1-pawsey/testsamples') testnames = os.listdir( '/media/arjun/VascLab EVO/projects/oct_ca_seg/runsaves/Final1-pawsey/testsamples' ) #this probs wont exist yet!!! diceorderednames = np.load( '/media/arjun/VascLab EVO/projects/oct_ca_seg/runsaves/Final1-pawsey/analysis/diceordered.npy' ) deploydata = DeployOCTDataset(data_dir, testnames)