315 print(x.shape, s.shape)
316 x = torch.cat((x, s), dim=1)
------------------------------------------------------------------------------
torch.Size([1, 128, 220, 160]) torch.Size([1, 128, 220, 160])
torch.Size([1, 128, 220, 160]) torch.Size([1, 96, 220, 160])
torch.Size([1, 128, 440, 320]) torch.Size([1, 96, 439, 319])
# model
IMAGE_SIZE : [128, 128] # load image size, if it's train mode, it will be randomly cropped to IMAGE_SIZE. If it's test mode, it will be resized to IMAGE_SIZE.
CHANNEL_X : 3 # input channel
CHANNEL_Y : 3 # output channel
TIMESTEPS : 100 # diffusion steps
SCHEDULE : 'linear' # linear or cosine
MODEL_CHANNELS : 32 # basic channels of Unet
NUM_RESBLOCKS : 1 # number of residual blocks
CHANNEL_MULT : [1,2,3,4] # channel multiplier of each layer
NUM_HEADS : 1
MODE : 0 # 1 Train, 0 Test
PRE_ORI : 'True' # if True, predict $x_0$, else predict $\epsilon$.
# test
NATIVE_RESOLUTION : 'False' # if True, test with native resolution
DPM_SOLVER : 'False' # if True, test with DPM_solver
DPM_STEP : 20 # DPM_solver step
BATCH_SIZE_VAL : 1 # test batch size
TEST_PATH_GT : '/content/drive/MyDrive/wight/data/' # path of ground truth
TEST_PATH_IMG : '/content/drive/MyDrive/wight/data/' # path of input
TEST_INITIAL_PREDICTOR_WEIGHT_PATH : '/content/drive/MyDrive/wight/init_predictor_document_deblurring.pth' # path of initial predictor
TEST_DENOISER_WEIGHT_PATH : '/content/drive/MyDrive/wight/denoiser_document_deblurring.pth' # path of denoiser
TEST_IMG_SAVE_PATH : './results'