sen-mao / 3di2i-translation

3D-Aware Multi-Class Image-to-Image Translation with NeRFs (CVPR 2023)
35 stars 2 forks source link

TypeError: forward() got an unexpected keyword argument 'c' #2

Open c1a1o1 opened 4 months ago

c1a1o1 commented 4 months ago

D:\anaconda3\python.exe D:\work\3di2i-translation\3di2i-translation-master\run_train.py D:\anaconda3\lib\site-packages\hydra\core\default_element.py:122: UserWarning: In 'spec/paper256': Usage of deprecated keyword in package header '# @package group'. See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/changes_to_package_header for more information warnings.warn( D:\anaconda3\lib\site-packages\hydra\core\default_element.py:122: UserWarning: In 'model/stylenerf_afhq': Usage of deprecated keyword in package header '# @package group'. See https://hydra.cc/docs/next/upgrades/1.0_to_1.1/changes_to_package_header for more information warnings.warn( D:/work/3di2i-translation/3di2i-translation-master/output D:/work/3di2i-translation/3di2i-translation-master/output\00019-afhq-paper256-stylenerf_afhq-noaug-resumecustom-freezed9

Training options: rank: 0 gpu: 0 num_gpus: 1 nodes: 1 world_size: 1 dist_url: env:// launcher: spawn partition: null comment: null timeout: 4320 job_dir: '' image_snapshot_ticks: 25 network_snapshot_ticks: 50 metrics:

Output directory: D:/work/3di2i-translation/3di2i-translation-master/output\00019-afhq-paper256-stylenerf_afhq-noaug-resumecustom-freezed9 Training data: D:/work/3di2i-translation/3di2i-translation-master/datasets/afhq.zip Training duration: 25000 kimg Number of images: 14630 Image resolution: 256 Conditional model: False Dataset x-flips: False

Creating output directory... Launching processes... wandb: W&B API key is configured. Use wandb login --relogin to force relogin wandb: wandb version 0.16.4 is available! To upgrade, please run: wandb: $ pip install wandb --upgrade wandb: Tracking run with wandb version 0.13.3 wandb: Run data is saved locally in D:\work\3di2i-translation\3di2i-translation-master\outputs\2024-03-21\18-04-50\wandb\run-20240321_180457-ogrh0eit wandb: Run wandb offline to turn off syncing. wandb: Syncing run hopeful-plant-18 wandb: View project at https://wandb.ai/c1a1p1/StyleNeRF wandb: View run at https://wandb.ai/c1a1p1/StyleNeRF/runs/ogrh0eit Loading training set...

Num images: 14630 Image shape: [3, 256, 256] Label shape: [0]

Constructing networks... Resuming from "D:/work/3di2i-translation/3di2i-translation-master/pretrained/ffhq_256.pkl" Setting up PyTorch plugin "bias_act_plugin"... Done. D:\anaconda3\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3484.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Setting up PyTorch plugin "upfirdn2d_plugin"... Done.

Generator Parameters Buffers Output shape Datatype


mapping_nerf.fc0 262656 - [8, 512] float32 mapping_nerf.fc1 262656 - [8, 512] float32 mapping_nerf.fc2 262656 - [8, 512] float32 mapping_nerf.fc3 262656 - [8, 512] float32 mapping_nerf.fc4 262656 - [8, 512] float32 mapping_nerf.fc5 262656 - [8, 512] float32 mapping_nerf.fc6 262656 - [8, 512] float32 mapping_nerf.fc7 262656 - [8, 512] float32 mapping_nerf - 512 [8, 10, 512] float32 mapping.fc0 262656 - [8, 512] float32 mapping.fc1 262656 - [8, 512] float32 mapping.fc2 262656 - [8, 512] float32 mapping.fc3 262656 - [8, 512] float32 mapping.fc4 262656 - [8, 512] float32 mapping.fc5 262656 - [8, 512] float32 mapping.fc6 262656 - [8, 512] float32 mapping.fc7 262656 - [8, 512] float32 mapping - 512 [8, 7, 512] float32 synthesis.fg_nerf.fc_in 38588 16 [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.0 82176 16 [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.1 82176 16 [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.2 82176 16 [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.3 82176 16 [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.4 82176 16 [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.5 82176 16 [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.6 82176 16 [112, 128, 32, 40] float32 synthesis.fg_nerf.sigma_out 65793 - [112, 1, 32, 40] float32 synthesis.fg_nerf.feat_out 73920 - [112, 64, 32, 40] float32 synthesis.fg_nerf.to_rgb 195 16 [112, 3, 32, 40] float32 synthesis.fg_nerf:0 - - [8, 17920, 67] float32 synthesis.fg_nerf:1 - - [8, 17920, 1] float32 synthesis.fg_nerf.fc_in - - [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.0 - - [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.1 - - [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.2 - - [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.3 - - [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.4 - - [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.5 - - [112, 128, 32, 40] float32 synthesis.fg_nerf.blocks.6 - - [112, 128, 32, 40] float32 synthesis.fg_nerf.sigma_out - - [112, 1, 32, 40] float32 synthesis.fg_nerf.feat_out - - [112, 64, 32, 40] float32 synthesis.fg_nerf.to_rgb - - [112, 3, 32, 40] float32 synthesis.fg_nerf:0 - - [8, 17920, 67] float32 synthesis.fg_nerf:1 - - [8, 17920, 1] float32 synthesis.bg_nerf.fc_in 7232 16 [32, 64, 32, 40] float32 synthesis.bg_nerf.blocks.0 4160 16 [32, 64, 32, 40] float32 synthesis.bg_nerf.blocks.1 4160 16 [32, 64, 32, 40] float32 synthesis.bg_nerf.blocks.2 4160 16 [32, 64, 32, 40] float32 synthesis.bg_nerf.sigma_out 65 - [32, 1, 32, 40] float32 synthesis.bg_nerf.feat_out 4160 - [32, 64, 32, 40] float32 synthesis.bg_nerf.to_rgb 195 16 [32, 3, 32, 40] float32 synthesis.bg_nerf:0 - - [8, 5120, 67] float32 synthesis.bg_nerf:1 - - [8, 5120, 1] float32 synthesis.b64.conv0 395968 48 [8, 512, 64, 64] float32 synthesis.b64.conv1 525312 16 [8, 512, 64, 64] float32 synthesis.b64.torgb 264195 - [8, 3, 64, 64] float32 synthesis.b64:0 - 16 [8, 512, 64, 64] float32 synthesis.b64:1 - - [8, 3, 64, 64] float32 synthesis.b128.conv0 476992 48 [8, 256, 128, 128] float16 synthesis.b128.conv1 197120 16 [8, 256, 128, 128] float16 synthesis.b128.torgb 132099 - [8, 3, 128, 128] float16 synthesis.b128:0 - 16 [8, 256, 128, 128] float16 synthesis.b128:1 - - [8, 3, 128, 128] float32 synthesis.b256.conv0 185248 48 [8, 128, 256, 256] float16 synthesis.b256.conv1 82176 16 [8, 128, 256, 256] float16 synthesis.b256.torgb 66051 - [8, 3, 256, 256] float16 synthesis.b256:0 - 16 [8, 128, 256, 256] float16 synthesis.b256:1 - - [8, 3, 256, 256] float32 synthesis.b64.conv0 - - [8, 512, 64, 128] float32 synthesis.b64.conv1 - - [8, 512, 64, 128] float32 synthesis.b64.torgb - - [8, 3, 64, 128] float32 synthesis.b128.conv0 - - [8, 256, 64, 128] float16 synthesis.b128.conv1 - - [8, 256, 64, 128] float16 synthesis.b128.torgb - - [8, 3, 64, 128] float16 synthesis.b128:0 - - [8, 256, 64, 128] float16 synthesis.b128:1 - - [8, 3, 64, 128] float32 synthesis.b256.conv0 - - [8, 128, 64, 128] float16 synthesis.b256.conv1 - - [8, 128, 64, 128] float16 synthesis.b256.torgb - - [8, 3, 64, 128] float16 synthesis.b256:0 - - [8, 128, 64, 128] float16 synthesis.b256:1 - - [8, 3, 64, 128] float32 synthesis - 1 - -


Total 7305517 1489 - -

Error executing job with overrides: [] wandb: Waiting for W&B process to finish... (failed 1). Press Ctrl-C to abort syncing. Traceback (most recent call last): File "D:\work\3di2i-translation\3di2i-translation-master\run_train.py", line 378, in main subprocess_fn(rank=0, args=args) File "D:\work\3di2i-translation\3di2i-translation-master\run_train.py", line 301, in subprocess_fn training_loop.training_loop(args) File "D:\work\3di2i-translation\3di2i-translation-master\training\training_loop.py", line 159, in training_loop misc.print_module_summary(D, [img, c], rank=rank) # todo: keras to torch ? File "D:\work\3di2i-translation\3di2i-translation-master\torch_utils\misc.py", line 241, in print_module_summary outputs = module(inputs) File "D:\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1538, in _call_impl result = forward_call(args, kwargs) File "D:\work\3di2i-translation\3di2i-translation-master\training\stylenerf.py", line 2278, in forward logits = self.b4(x, img, cmap, c=c.detach()) File "D:\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1538, in _call_impl result = forward_call(*args, **kwargs) TypeError: forward() got an unexpected keyword argument 'c'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

sen-mao commented 3 months ago

Whether labels are added when preparing the dataset ?