Closed wengzp1 closed 1 year ago
Hi, I saw you changed data_len
to 50, right? Can you try to change verbose_freq
in sinskitG_model.py
to 50 too? Basically, we want to have verbose_freq
< data_len
so that the model has computed the metric before it is asked to print them out.
你好,我看到你改成
data_len
50了吧?您也可以尝试更改verbose_freq
为sinskitG_model.py
50吗?基本上,我们想要verbose_freq
<data_len
以便模型在被要求打印出来之前计算出指标。
Thank you for your method, which has solved this problem.
Hello,when I run material=BlackJeans CUDA_VISIBLE_DEVICES=0 python train.py --gpu_ids 0 --name "${material}_sinskitG_baselineours" --model sinskitG --dataroot ./datasets/"singleskit${material}_padded_1800_x1/",the following error occurred: Preproccess data for singleskit_dataset and save them in cache, len 50... Finish preprocessing 50 data, takes 111.22777891159058 len dataloader 50 Setting up [LPIPS] perceptual loss: trunk [vgg], v[0.1], spatial [off] Loading model from: /home/wzp/anaconda3/envs/VTS/lib/python3.8/site-packages/lpips/weights/v0.1/vgg.pth Define G network num_downs 8 Initializing CustomUnetGenerator, ngf 10 Define D network Define D2 network model [SinSKITGModel] was created The number of training images = 50 create web directory ./checkpoints/BluePants_sinskitG_baseline_ours/web... total epoch opt.epoch_count 1 opt.n_epochs 5 opt.n_epochs_decay 400 check display opt params opt.print_freq 100 opt.display_freq 100 check test setting True Start epoch 1 ---------- Networks initialized ------------- [Network G] Total number of parameters : 1.466 M [Network D] Total number of parameters : 0.135 M [Network D2] Total number of parameters : 0.136 M
total_iters 50 can't get metric I_SIFID Traceback (most recent call last): File "/home/wzp/visual-tactile-synthesis-main/models/base_model.py", line 196, in get_current_metrics metricsret['m'+name] = float(getattr(self, 'metric_' + name)) AttributeError: 'SinSKITGModel' object has no attribute 'metric_I_SIFID'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "train.py", line 156, in
eval_metrics = model.get_current_metrics()
File "/home/wzp/visual-tactile-synthesis-main/models/base_model.py", line 199, in get_currentmetrics
print("metric", getattr(self, 'metric' + name))
AttributeError: 'SinSKITGModel' object has no attribute 'metric_I_SIFID'.
Could you tell me how to solve the problem?