Closed GIT-HYQ closed 9 months ago
Have you solved this problem now? Can you tell me how to solve it? Thank you for contacting me: liuxin123450926@163.com
@clair123456 @OPA067 @GuoLanqing Hello, have you solved this problem? Can you tell me how to solve it? Please contact me:huziqi0219@163.com
Have you solved this problem now? Can you tell me how to solve it? Thank you for contacting me: liuxin123450926@163.com
try this model.py L147 out_dict['SR'] = self.SR[0].detach().float().cpu()
@clair123456 @OPA067 @GuoLanqing Hello, have you solved this problem? Can you tell me how to solve it? Please contact me:huziqi0219@163.com
try this model.py L147 out_dict['SR'] = self.SR[0].detach().float().cpu()
Can you help me with this error, thanks a lot. 1. train the network in colab,GPU: T4
python /content/drive/MyDrive/ShadowDiffusion/sr.py -p train -c /content/drive/MyDrive/ShadowDiffusion/config/shadow.json
2. key error log,full log is below Traceback (most recent call last): File "/content/drive/MyDrive/ShadowDiffusion/sr.py", line 138, in
visuals = diffusion.get_current_visuals()
File "/content/drive/MyDrive/ShadowDiffusion/model/model.py", line 147, in get_current_visuals
out_dict['SR'] =
self.SR.detach().float().cpu()
AttributeError: 'tuple' object has no attribute 'detach'3. shadow.json { "name": "istd_test1", "phase": "train", // train or val "gpu_ids": [ 0 ], "path": { //set the path "log": "/content/drive/MyDrive/ShadowDiffusion/logs", "tb_logger": "tb_logger", "results": "/content/drive/MyDrive/ShadowDiffusion/results", "checkpoint": "/content/drive/MyDrive/ShadowDiffusion/checkpoint", "resume_state": null //"resume_state": "/content/drive/MyDrive/ShadowDiffusion/checkpoint" //pretrain model or training state }, "datasets": { "train": { "name": "FFHQ", "mode": "HR", // whether need LR img "dataroot": "/content/drive/MyDrive/dataset/ISTD_Dataset/train", "datatype": "img", //lmdb or img, path of img files "l_resolution": "low", // low resolution need to super_resolution "r_resolution": "high", // high resolution "batch_size": 12, "num_workers": 8, "use_shuffle": true, "data_len": -1 // -1 represents all data used in train }, "val": { "name": "CelebaHQ", "mode": "LRHR", "dataroot": "/content/drive/MyDrive/dataset/ISTD_Dataset/test", "datatype": "img", //lmdb or img, path of img files "l_resolution": "test_low", "r_resolution": "test_high", "data_len": -1 } }, "model": { "which_model_G": "sr3", // use the ddpm or sr3 network structure "finetune_norm": false, "unet": { "in_channel": 7, "out_channel": 3, "inner_channel": 64, "norm_groups": 16, "channel_multiplier": [ 1, 2, 4, 8 // 8, // 16, ], "attn_res": [ 16 ], "res_blocks": 2, "dropout": 0 }, "beta_schedule": { // use munual beta_schedule for acceleration "train": { "schedule": "linear", "n_timestep": 1000, "linear_start": 1e-4, "linear_end": 0.02 }, "val": { "schedule": "linear", "n_timestep": 1000, "linear_start": 1e-4, "linear_end": 0.02 } }, "diffusion": { "image_size": 512, "channels": 3, //sample channel "conditional": true // unconditional generation or unconditional generation(super_resolution) } }, "train": { "n_iter": 1e8, "val_freq": 2000, "save_checkpoint_freq": 10000, "print_freq": 100, "optimizer": { "type": "adam", "lr": 3e-05 }, "ema_scheduler": { // not used now "step_start_ema": 5000, "update_ema_every": 1, "ema_decay": 0.9999 } }, "wandb": { "project": "distributed_high_sr_ffhq" } }
4. full logs ` 2023-08-09 09:46:29.706632: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-08-09 09:46:30.819111: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT export CUDA_VISIBLE_DEVICES=0 23-08-09 09:46:33.198 - INFO: name: istd_test1 phase: train gpu_ids: [0] path:[ log: /content/drive/MyDrive/ShadowDiffusion/logs tb_logger: experiments/istd_test1_230809_094633/tb_logger results: /content/drive/MyDrive/ShadowDiffusion/results checkpoint: /content/drive/MyDrive/ShadowDiffusion/checkpoint resume_state: None
`