Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail to pretrain #3

Open
chuanfushen opened this issue Jan 2, 2024 · 3 comments
Open

fail to pretrain #3

chuanfushen opened this issue Jan 2, 2024 · 3 comments

Comments

@chuanfushen
Copy link

Hi, Thanks for your great work!
When I train THuman using the script:

python train.py expname=pretrain

I obtain the below error.

Traceback (most recent call last):
  File "pretrain/train.py", line 124, in <module>
    main()
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/utils.py", line 394, in _run_hydra
    _run_app(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/utils.py", line 457, in _run_app
    run_and_report(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
    raise ex
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
    return func()
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/utils.py", line 458, in <lambda>
    lambda: hydra.run(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 105, in run
    cfg = self.compose_config(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/hydra.py", line 594, in compose_config
    cfg = self.config_loader.load_configuration(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 142, in load_configuration
    return self._load_configuration_impl(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/config_loader_impl.py", line 253, in _load_configuration_impl
    defaults_list = create_defaults_list(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 745, in create_defaults_list
    defaults, tree = _create_defaults_list(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 715, in _create_defaults_list
    defaults_tree = _create_defaults_tree(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 356, in _create_defaults_tree
    ret = _create_defaults_tree_impl(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 457, in _create_defaults_tree_impl
    return _expand_virtual_root(repo, root, overrides, skip_missing)
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 280, in _expand_virtual_root
    subtree = _create_defaults_tree_impl(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 573, in _create_defaults_tree_impl
    add_child(children, new_root)
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 520, in add_child
    subtree_ = _create_defaults_tree_impl(
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 472, in _create_defaults_tree_impl
    overrides.set_known_choice(parent)
  File "/lab01/micromamba/envs/3dreid/lib/python3.8/site-packages/hydra/_internal/defaults_list.py", line 185, in set_known_choice
    raise ConfigCompositionException(
hydra.errors.ConfigCompositionException: Multiple values for network. To override a value use 'override network: texture'
@chuanfushen
Copy link
Author

I have deal with this issue by modifying config.yaml:

defaults:
  - datamodule: data
hydra:
  run:
    dir: outputs/${expname}/

expname: joint
resume: false
starting_path: 'checkpoints/0.pth'
eval_mode: interp
seed: 42
agent_tot: 1
agent_id: 0

trainer:
  max_epochs: 2000
  gradient_clip_val: 0.1
  check_val_every_n_epoch: 10
  lr_scheduler_stepsize: [500,1000,1500]
  lr_schedule_decay_rate: 0.1
  deterministic: true
  gpus: -1
  log_every_n_steps: 5
  accelerator: 'ddp'
  profiler: 'simple'


model:
  dim_naked_shape: 512
  dim_clothed_shape: 512
  dim_texture: 512

  deformer:
    _target_: lib.model.deformer.ForwardDeformer
    max_steps: 50
    disp_network:
      _target_: lib.model.network.ImplicitNetwork
      d_in: 3
      d_out: 3
      width: 128
      depth: 4
      geometric_init: false
      bias: 1
      weight_norm: true
      multires: 0
      pose_cond_dim: 69
      pose_cond_layer: []
      pose_embed_dim: -1
      shape_cond_dim: 512
      shape_cond_layer: [0]
      shape_embed_dim: -1
      latent_cond_dim: 128
      latent_cond_layer: []
      latent_embed_dim: -1
      final_acti_type: none
    lbs_network:
      _target_: lib.model.network.ImplicitNetwork
      d_in: 3
      d_out: 24
      width: 128
      depth: 4
      geometric_init: false
      bias: 1
      weight_norm: true
      multires: 0
      pose_cond_dim: 69
      pose_cond_layer: []
      pose_embed_dim: -1
      shape_cond_dim: 10
      shape_cond_layer: []
      shape_embed_dim: -1
      latent_cond_dim: 512
      latent_cond_layer: [0]
      latent_embed_dim: -1
      final_acti_type: none

  clothed_network:
    _target_: lib.model.network.ImplicitNetwork
    d_in: 3
    d_out: 257
    width: 512
    depth: 8
    geometric_init: true
    bias: 1
    skip_in: [4]
    weight_norm: true
    multires: 6
    pose_cond_dim: 69
    pose_cond_layer: []
    pose_embed_dim: -1
    shape_cond_dim: 10
    shape_cond_layer: []
    shape_embed_dim: -1
    latent_cond_dim: 512
    latent_cond_layer: [0]
    latent_embed_dim: -1
    feat_cond_dim: 256
    feat_cond_layer: [0]
    final_acti_type: none

  naked_network:
    _target_: lib.model.network.ImplicitNetwork
    d_in: 3
    d_out: 257
    width: 512
    depth: 8 #4
    geometric_init: true
    bias: 1
    skip_in: [4]
    weight_norm: true
    multires: 6
    pose_cond_dim: 69
    pose_cond_layer: []
    pose_embed_dim: -1
    shape_cond_dim: 10
    shape_cond_layer: []
    shape_embed_dim: -1
    latent_cond_dim: 64
    latent_cond_layer: [0]
    latent_embed_dim: -1
    final_acti_type: none

  texture_network:
    _target_: lib.model.network.ImplicitNetwork
    d_in: 3
    d_out: 3
    width: 256 #128
    depth: 6 #4
    weight_norm: true
    multires: 6
    pose_cond_dim: 69
    pose_cond_layer: []
    pose_embed_dim: -1
    shape_cond_dim: 10
    shape_cond_layer: []
    shape_embed_dim: -1
    latent_cond_dim: 512
    latent_cond_layer: [0, 4]
    skip_in: []
    latent_embed_dim: -1
    feat_cond_dim: 256
    feat_cond_layer: [0]


  optim:
    lr: 1e-3

  nepochs_pretrain: 10    #1
  pretrain_bone: true
  nepochs_pretrain_coarse: 0    #1
  lambda_bone_occ: 1
  lambda_bone_w: 10
  lambda_disp: 10
  lambda_reg: 1e-3

@Bruce-GuoS
Copy link

I have deal with this issue by modifying config.yaml:

defaults:
  - datamodule: data
hydra:
  run:
    dir: outputs/${expname}/

expname: joint
resume: false
starting_path: 'checkpoints/0.pth'
eval_mode: interp
seed: 42
agent_tot: 1
agent_id: 0

trainer:
  max_epochs: 2000
  gradient_clip_val: 0.1
  check_val_every_n_epoch: 10
  lr_scheduler_stepsize: [500,1000,1500]
  lr_schedule_decay_rate: 0.1
  deterministic: true
  gpus: -1
  log_every_n_steps: 5
  accelerator: 'ddp'
  profiler: 'simple'


model:
  dim_naked_shape: 512
  dim_clothed_shape: 512
  dim_texture: 512

  deformer:
    _target_: lib.model.deformer.ForwardDeformer
    max_steps: 50
    disp_network:
      _target_: lib.model.network.ImplicitNetwork
      d_in: 3
      d_out: 3
      width: 128
      depth: 4
      geometric_init: false
      bias: 1
      weight_norm: true
      multires: 0
      pose_cond_dim: 69
      pose_cond_layer: []
      pose_embed_dim: -1
      shape_cond_dim: 512
      shape_cond_layer: [0]
      shape_embed_dim: -1
      latent_cond_dim: 128
      latent_cond_layer: []
      latent_embed_dim: -1
      final_acti_type: none
    lbs_network:
      _target_: lib.model.network.ImplicitNetwork
      d_in: 3
      d_out: 24
      width: 128
      depth: 4
      geometric_init: false
      bias: 1
      weight_norm: true
      multires: 0
      pose_cond_dim: 69
      pose_cond_layer: []
      pose_embed_dim: -1
      shape_cond_dim: 10
      shape_cond_layer: []
      shape_embed_dim: -1
      latent_cond_dim: 512
      latent_cond_layer: [0]
      latent_embed_dim: -1
      final_acti_type: none

  clothed_network:
    _target_: lib.model.network.ImplicitNetwork
    d_in: 3
    d_out: 257
    width: 512
    depth: 8
    geometric_init: true
    bias: 1
    skip_in: [4]
    weight_norm: true
    multires: 6
    pose_cond_dim: 69
    pose_cond_layer: []
    pose_embed_dim: -1
    shape_cond_dim: 10
    shape_cond_layer: []
    shape_embed_dim: -1
    latent_cond_dim: 512
    latent_cond_layer: [0]
    latent_embed_dim: -1
    feat_cond_dim: 256
    feat_cond_layer: [0]
    final_acti_type: none

  naked_network:
    _target_: lib.model.network.ImplicitNetwork
    d_in: 3
    d_out: 257
    width: 512
    depth: 8 #4
    geometric_init: true
    bias: 1
    skip_in: [4]
    weight_norm: true
    multires: 6
    pose_cond_dim: 69
    pose_cond_layer: []
    pose_embed_dim: -1
    shape_cond_dim: 10
    shape_cond_layer: []
    shape_embed_dim: -1
    latent_cond_dim: 64
    latent_cond_layer: [0]
    latent_embed_dim: -1
    final_acti_type: none

  texture_network:
    _target_: lib.model.network.ImplicitNetwork
    d_in: 3
    d_out: 3
    width: 256 #128
    depth: 6 #4
    weight_norm: true
    multires: 6
    pose_cond_dim: 69
    pose_cond_layer: []
    pose_embed_dim: -1
    shape_cond_dim: 10
    shape_cond_layer: []
    shape_embed_dim: -1
    latent_cond_dim: 512
    latent_cond_layer: [0, 4]
    skip_in: []
    latent_embed_dim: -1
    feat_cond_dim: 256
    feat_cond_layer: [0]


  optim:
    lr: 1e-3

  nepochs_pretrain: 10    #1
  pretrain_bone: true
  nepochs_pretrain_coarse: 0    #1
  lambda_bone_occ: 1
  lambda_bone_w: 10
  lambda_disp: 10
  lambda_reg: 1e-3

Hello, did you reproduce the results of the author's?

@chuanfushen
Copy link
Author

not really, I am currently working on other project, so I don't continue working on this repo anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants