exp8 版本
This commit is contained in:
parent
2a0a56ac26
commit
76fcec26e8
@ -305,19 +305,6 @@ class RomaUnsbModel(BaseModel):
|
|||||||
initialized at the first feedforward pass with some input images.
|
initialized at the first feedforward pass with some input images.
|
||||||
Please also see PatchSampleF.create_mlp(), which is called at the first forward() call.
|
Please also see PatchSampleF.create_mlp(), which is called at the first forward() call.
|
||||||
"""
|
"""
|
||||||
#bs_per_gpu = data["A"].size(0) // max(len(self.opt.gpu_ids), 1)
|
|
||||||
#self.set_input(data)
|
|
||||||
#self.real_A = self.real_A[:bs_per_gpu]
|
|
||||||
#self.real_B = self.real_B[:bs_per_gpu]
|
|
||||||
#self.forward() # compute fake images: G(A)
|
|
||||||
#if self.opt.isTrain:
|
|
||||||
#
|
|
||||||
# self.compute_G_loss().backward()
|
|
||||||
# self.compute_D_loss().backward()
|
|
||||||
# self.compute_E_loss().backward()
|
|
||||||
# if self.opt.lambda_NCE > 0.0:
|
|
||||||
# self.optimizer_F = torch.optim.Adam(self.netF.parameters(), lr=self.opt.lr, betas=(self.opt.beta1, self.opt.beta2))
|
|
||||||
# self.optimizers.append(self.optimizer_F)
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def optimize_parameters(self):
|
def optimize_parameters(self):
|
||||||
|
|||||||
@ -7,27 +7,29 @@
|
|||||||
|
|
||||||
python train.py \
|
python train.py \
|
||||||
--dataroot /home/openxs/kunyu/datasets/InfraredCity-Lite/Double/Moitor \
|
--dataroot /home/openxs/kunyu/datasets/InfraredCity-Lite/Double/Moitor \
|
||||||
--name UNIV_1 \
|
--name UNIV_5 \
|
||||||
--dataset_mode unaligned_double \
|
--dataset_mode unaligned_double \
|
||||||
--no_flip \
|
|
||||||
--display_env UNIV \
|
--display_env UNIV \
|
||||||
--model roma_unsb \
|
--model roma_unsb \
|
||||||
--lambda_GAN 2.0 \
|
|
||||||
--lambda_SB 1.0 \
|
--lambda_SB 1.0 \
|
||||||
--lambda_ctn 1.0 \
|
--lambda_ctn 10 \
|
||||||
--lambda_inc 1.0 \
|
--lambda_inc 1.0 \
|
||||||
--lr 0.00001 \
|
--lambda_global 6.0 \
|
||||||
--gpu_id 0 \
|
--gamma_stride 20 \
|
||||||
--lambda_D_ViT 1 \
|
--lr 0.000002 \
|
||||||
|
--gpu_id 1 \
|
||||||
--nce_idt False \
|
--nce_idt False \
|
||||||
--netF mlp_sample \
|
--netF mlp_sample \
|
||||||
--flip_equivariance True \
|
|
||||||
--eta_ratio 0.4 \
|
--eta_ratio 0.4 \
|
||||||
--tau 0.01 \
|
--tau 0.01 \
|
||||||
--num_timesteps 4 \
|
--num_timesteps 5 \
|
||||||
--input_nc 3 \
|
--input_nc 3 \
|
||||||
--n_epochs 400 \
|
--n_epochs 400 \
|
||||||
--n_epochs_decay 200 \
|
--n_epochs_decay 200 \
|
||||||
|
|
||||||
# exp1 num_timesteps=4
|
# exp1 num_timesteps=4 (已停)
|
||||||
# exp2 num_timesteps=5
|
# exp2 num_timesteps=5 (已停)
|
||||||
|
# exp3 --num_timesteps 5,--lambda_inc 8 ,--gamma_stride 20,--lambda_global 6.0,--lambda_ctn 10, --lr 0.000002 (已停)
|
||||||
|
# exp4 --num_timesteps 5,--lambda_inc 8 ,--gamma_stride 20,--lambda_global 6.0,--lambda_ctn 10, --lr 0.000002, ET_XY=self.netE(XtXt_1, self.time, XtXt_1).mean() - torch.logsumexp(self.netE(XtXt_1, self.time_idx, XtXt_2).reshape(-1), dim=0) ,并把GAN,CTN loss考虑到了A1和B1 (已停)
|
||||||
|
# exp5 基于 exp4 ,修改了 self.loss_global = self.calculate_similarity(self.mutil_real_A0_tokens, self.mutil_fake_B0_tokens) + self.calculate_similarity(mutil_real_A1_tokens, self.mutil_fake_B1_tokens) ,gpu_id 1 (已停)
|
||||||
|
# 上面几个实验效果都不好,实验结果都已经删除了,开的新的train_sbiv 对代码进行了调整,效果变得更好了。
|
||||||
33
scripts/train_sbiv.sh
Executable file
33
scripts/train_sbiv.sh
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Train for video mode
|
||||||
|
#CUDA_VISIBLE_DEVICES=0 python train.py --dataroot /path --name ROMA_name --dataset_mode unaligned_double --no_flip --local_nums 64 --display_env ROMA_env --model roma --side_length 7 --lambda_spatial 5.0 --lambda_global 5.0 --lambda_motion 1.0 --atten_layers 1,3,5 --lr 0.00001
|
||||||
|
|
||||||
|
# Train for image mode
|
||||||
|
#CUDA_VISIBLE_DEVICES=0 python train.py --dataroot /path --name ROMA_name --dataset_mode unaligned --local_nums 64 --display_env ROMA_env --model roma --side_length 7 --lambda_spatial 5.0 --lambda_global 5.0 --atten_layers 1,3,5 --lr 0.00001
|
||||||
|
|
||||||
|
python train.py \
|
||||||
|
--dataroot /home/openxs/kunyu/datasets/InfraredCity-Lite/Double/Moitor \
|
||||||
|
--name SBIV_4 \
|
||||||
|
--dataset_mode unaligned_double \
|
||||||
|
--display_env SBIV \
|
||||||
|
--model roma_unsb \
|
||||||
|
--lambda_SB 1.0 \
|
||||||
|
--lambda_ctn 10 \
|
||||||
|
--lambda_inc 1.0 \
|
||||||
|
--lambda_global 6.0 \
|
||||||
|
--gamma_stride 20 \
|
||||||
|
--lr 0.000002 \
|
||||||
|
--gpu_id 2 \
|
||||||
|
--nce_idt False \
|
||||||
|
--netF mlp_sample \
|
||||||
|
--eta_ratio 0.4 \
|
||||||
|
--tau 0.01 \
|
||||||
|
--num_timesteps 3 \
|
||||||
|
--input_nc 3 \
|
||||||
|
--n_epochs 400 \
|
||||||
|
--n_epochs_decay 200 \
|
||||||
|
|
||||||
|
# exp6 num_timesteps=4 ,gpu_id 0(基于 exp5 ,exp1 已停) (已停)
|
||||||
|
# exp7 num_timesteps=3 ,gpu_id 0 基于 exp6 (将停)
|
||||||
|
# # exp8 num_timesteps=4 ,gpu_id 1 ,修改了训练判别器的loss,以及ctnloss(基于,exp6)
|
||||||
|
# # exp9 num_timesteps=3 ,gpu_id 2 ,(基于 exp8)
|
||||||
Loading…
x
Reference in New Issue
Block a user