示例#1
0
lr = 0.0001
momentum = 0.0
weight_decay = 0.0
dropout = True
color = False
rotate = 1.0
outdir = '/imatge/jdelarica/work/PycharmProjects/TFG/tests/sgd_lr0.0001_mom0.0_wd0.0_drop'

# Copy ourselves to outdir to replicate results
if not os.path.exists(outdir):
    os.makedirs(outdir)
shutil.copy(__file__, os.path.join(outdir, 'train.py'))

print('Loading data ... ', end='')
if rotate:
    rotate_transform = datasets.RandomRotate(p=rotate)
else:
    rotate_transform = None
dataset = {}
dataloader = {}
dataset['train'] = datasets.FreiburgRGBDDataset('data',
                                                mode='train',
                                                color=None,
                                                transform=None,
                                                seed=42)
dataloader['train'] = DataLoader(dataset['train'],
                                 batch_size=16,
                                 shuffle=True,
                                 num_workers=0)
dataset['val'] = datasets.FreiburgRGBDDataset('data',
                                              mode='val',
示例#2
0
# Variables
nepochs = 1000
lr = 0.0001
momentum = 0.0
weight_decay = 0.0
dropout = True
color = True
outdir = 'tests/sgd_lr0.0001_mom0.0_wd0.0_drop_color'

# Copy ourselves to outdir to replicate results
if not os.path.exists(outdir):
    os.makedirs(outdir)
shutil.copy(__file__, os.path.join(outdir, 'train.py'))

print('Loading data ... ', end='')
rotate = datasets.RandomRotate(p=1.0)
dataset = {}
dataloader = {}
dataset['train'] = datasets.FreiburgRGBDDataset('data',
                                                mode='train',
                                                color=color,
                                                transform=None,
                                                seed=42)
dataloader['train'] = DataLoader(dataset['train'],
                                 batch_size=16,
                                 shuffle=True,
                                 num_workers=0)
dataset['val'] = datasets.FreiburgRGBDDataset('data',
                                              mode='val',
                                              color=color,
                                              seed=42)