未验证 提交 ad631f41 编写于 作者: L lzzyzlbb 提交者: GitHub

fix tipc (#517)

* fix tipc

* add cyclegan eval
上级 79a6419f
......@@ -120,6 +120,11 @@ log_config:
snapshot_config:
interval: 5
export_model:
- {name: 'netG_A', inputs_num: 1}
- {name: 'netG_B', inputs_num: 1}
validate:
interval: 30000
save_img: false
metrics:
fid: # metric name, can be arbitrary
name: FID
batch_size: 8
......@@ -242,3 +242,13 @@ class CycleGANModel(BaseModel):
self.backward_D_B()
# update D_A and D_B's weights
optimizers['optimD'].step()
def test_iter(self, metrics=None):
self.nets['netG_A'].eval()
self.forward()
with paddle.no_grad():
if metrics is not None:
for metric in metrics.values():
metric.update(self.fake_B, self.real_B)
self.nets['netG_A'].train()
......@@ -13,7 +13,7 @@ train_infer_img_dir:./data/msvsr_reds/test
null:null
##
trainer:norm_train
norm_train:tools/main.py -c configs/msvsr_reds.yaml --seed 123 -o dataset.train.dataset.num_clips=2 dataset.train.num_workers=0 log_config.interval=1 snapshot_config.interval=5
norm_train:tools/main.py -c configs/msvsr_reds.yaml --seed 123 -o dataset.train.dataset.num_clips=2 dataset.train.num_workers=0 log_config.interval=1 snapshot_config.interval=5 dataset.train.dataset.number_frames=2
pact_train:null
fpgm_train:null
distill_train:null
......@@ -27,7 +27,7 @@ null:null
===========================infer_params===========================
--output_dir:./output/
load:null
norm_export:tools/export_model.py -c configs/msvsr_reds.yaml --inputs_size="1,4,3,180,320" --load
norm_export:tools/export_model.py -c configs/msvsr_reds.yaml --inputs_size="1,2,3,180,320" --load
quant_export:null
fpgm_export:null
distill_export:null
......@@ -37,7 +37,7 @@ inference_dir:multistagevsrmodel_generator
train_model:./inference/msvsr/multistagevsrmodel_generator
infer_export:null
infer_quant:False
inference:tools/inference.py --model_type msvsr -c configs/msvsr_reds.yaml --seed 123 -o dataset.test.num_clips=2 dataset.test.number_frames=4 --output_path test_tipc/output/
inference:tools/inference.py --model_type msvsr -c configs/msvsr_reds.yaml --seed 123 -o dataset.test.num_clips=2 dataset.test.number_frames=2 --output_path test_tipc/output/
--device:gpu
null:null
null:null
......@@ -48,4 +48,4 @@ null:null
null:null
null:null
--benchmark:True
null:null
\ No newline at end of file
null:null
Metric psnr: 27.3670
Metric ssim: 0.8021
\ No newline at end of file
Metric psnr: 24.3250
Metric ssim: 0.6497
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册