] train_dataset = AmbiLocalFeatDataset( iccv_res_dir=iccv_res_dir, image_dir=cambridge_img_dir, lmdb_paths=lmdb_img_cache, dataset_list=dataset_list, downsample_scale=0.5, sampling_num=30, sample_res_cache='/mnt/Exp_5/AmbiguousData_pg/temp_cache.bin', sub_graph_nodes=24) # set train parameters train_params = TrainParameters() train_params.MAX_EPOCHS = 20 train_params.START_LR = 1.0e-4 train_params.DEV_IDS = [0, 1] train_params.LOADER_BATCH_SIZE = 1 train_params.LOADER_NUM_THREADS = 0 train_params.VALID_STEPS = 5000 train_params.MAX_VALID_BATCHES_NUM = 20 train_params.CHECKPOINT_STEPS = 6000 train_params.VERBOSE_MODE = True train_params.NAME_TAG = 'test_gat_cluster' box = LocalGlobalGATTrainBox(train_params=train_params, ckpt_path_dict=checkpoint_dict) train_loader = dataloader.DataLoader(train_dataset, batch_size=1, shuffle=False,
import pickle import torch import torchtext from trainbox import DPCNNTrainBox import numpy as np # [1] """ Train Parameters --------------------------------------------------------------------------------------------------- """ # toggle `DEBUG` to disable logger (won't dump to disk) DEBUG = False # set train parameters train_params = TrainParameters() train_params.MAX_EPOCHS = 10 train_params.START_LR = 0.01 train_params.DEV_IDS = [0] train_params.LOADER_BATCH_SIZE = 100 train_params.LOADER_NUM_THREADS = 0 train_params.VALID_STEPS = 250 train_params.MAX_VALID_BATCHES_NUM = 50 train_params.CHECKPOINT_STEPS = 3000 train_params.VERBOSE_MODE = True train_params.LOADER_VALID_BATCH_SIZE = train_params.LOADER_BATCH_SIZE train_params.LR_DECAY_FACTOR = 0.1 train_params.LR_DECAY_STEPS = 8 # specific unique description for current training experiments train_params.NAME_TAG = 'dpcnn' train_params.DESCRIPTION = 'Initial eval'