Hi,
Thank you for your great work. I faced some problem when running evaluation on 3DPW. I was trying to use 1 GPU instead of 4. However, there are some errors that I don't understand. Would you help me see where I need to adjust?
(gphmr) jyz@jyz-Alienware-Aurora-R8:~/GitHub/MeshGraphormer$ python src/tools/run_gphmer_bodymesh.py --val_yaml 3dpw/test_has_gender.yaml --arch hrnet-w64 --num_workers 4 --per_gpu_eval_batch_size 25 --num_hidden_layers 4 --num_attention_heads 4 --input_feat_dim 2051,512,128 --hidden_feat_dim 1024,256,64 --run_eval_only --resume_checkpoint ./models/graphormer_release/graphormer_3dpw_state_dict.bin
set os.environ[OMP_NUM_THREADS] to 4
2021-10-28 04:44:38,749 Graphormer INFO: Using 1 GPUs
/home/jyz/anaconda3/envs/gphmr/lib/python3.7/site-packages/scipy/sparse/_index.py:84: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil_matrix is more efficient.
self._set_intXint(row, col, x.flat[0])
/home/jyz/anaconda3/envs/gphmr/lib/python3.7/site-packages/scipy/sparse/_index.py:84: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil_matrix is more efficient.
self._set_intXint(row, col, x.flat[0])
/home/jyz/anaconda3/envs/gphmr/lib/python3.7/site-packages/scipy/sparse/_index.py:84: SparseEfficiencyWarning: Changing the sparsity structure of a csr_matrix is expensive. lil_matrix is more efficient.
self._set_intXint(row, col, x.flat[0])
2021-10-28 04:44:53,992 Graphormer INFO: Update config parameter num_hidden_layers: 12 -> 4
2021-10-28 04:44:53,992 Graphormer INFO: Update config parameter hidden_size: 768 -> 1024
2021-10-28 04:44:53,992 Graphormer INFO: Update config parameter num_attention_heads: 12 -> 4
2021-10-28 04:44:53,992 Graphormer INFO: Update config parameter intermediate_size: 3072 -> 2048
2021-10-28 04:44:54,909 Graphormer INFO: Init model from scratch.
2021-10-28 04:44:54,909 Graphormer INFO: Update config parameter num_hidden_layers: 12 -> 4
2021-10-28 04:44:54,909 Graphormer INFO: Update config parameter hidden_size: 768 -> 256
2021-10-28 04:44:54,909 Graphormer INFO: Update config parameter num_attention_heads: 12 -> 4
2021-10-28 04:44:54,909 Graphormer INFO: Update config parameter intermediate_size: 3072 -> 512
2021-10-28 04:44:55,045 Graphormer INFO: Init model from scratch.
2021-10-28 04:44:55,046 Graphormer INFO: Add Graph Conv
2021-10-28 04:44:55,046 Graphormer INFO: Update config parameter num_hidden_layers: 12 -> 4
2021-10-28 04:44:55,046 Graphormer INFO: Update config parameter hidden_size: 768 -> 64
2021-10-28 04:44:55,046 Graphormer INFO: Update config parameter num_attention_heads: 12 -> 4
2021-10-28 04:44:55,046 Graphormer INFO: Update config parameter intermediate_size: 3072 -> 128
2021-10-28 04:44:55,112 Graphormer INFO: Init model from scratch.
=> loading pretrained model models/hrnet/hrnetv2_w64_imagenet_pretrained.pth
2021-10-28 04:45:00,432 Graphormer INFO: => loading hrnet-v2-w64 model
2021-10-28 04:45:00,433 Graphormer INFO: Graphormer encoders total parameters: 83318598
2021-10-28 04:45:00,435 Graphormer INFO: Backbone total parameters: 128059944
2021-10-28 04:45:00,488 Graphormer INFO: Loading state dict from checkpoint ./models/graphormer_release/graphormer_3dpw_state_dict.bin
2021-10-28 04:45:07,582 Graphormer INFO: Training parameters Namespace(arch='hrnet-w64', config_name='', data_dir='datasets', device=device(type='cuda'), distributed=False, drop_out=0.1, hidden_feat_dim='1024,256,64', hidden_size=64, img_scale_factor=1, input_feat_dim='2051,512,128', interm_size_scale=2, intermediate_size=128, joints_loss_weight=1000.0, local_rank=0, logging_steps=1000, lr=0.0001, mesh_type='body', model_name_or_path='src/modeling/bert/bert-base-uncased/', num_attention_heads=4, num_gpus=1, num_hidden_layers=4, num_train_epochs=200, num_workers=4, output_dir='output/', per_gpu_eval_batch_size=25, per_gpu_train_batch_size=30, resume_checkpoint='./models/graphormer_release/graphormer_3dpw_state_dict.bin', run_eval_only=True, seed=88, train_yaml='imagenet2012/train.yaml', val_yaml='3dpw/test_has_gender.yaml', vertices_loss_weight=100.0, vloss_w_full=0.33, vloss_w_sub=0.33, vloss_w_sub2=0.33, which_gcn='0,0,1')
3dpw/test_has_gender.yaml
Traceback (most recent call last):
File "src/tools/run_gphmer_bodymesh.py", line 747, in
main(args)
File "src/tools/run_gphmer_bodymesh.py", line 734, in main
run_eval_general(args, val_dataloader, _model, smpl, mesh_sampler)
File "src/tools/run_gphmer_bodymesh.py", line 374, in run_eval_general
mesh_sampler)
File "src/tools/run_gphmer_bodymesh.py", line 412, in run_validate
gt_vertices = smpl(gt_pose, gt_betas)
File "/home/jyz/anaconda3/envs/gphmr/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/jyz/GitHub/MeshGraphormer/MeshGraphormer/src/modeling/_smpl.py", line 94, in forward
v_posed = v_shaped + torch.matmul(posedirs, lrotmin[:, :, None]).view(-1, 6890, 3)
RuntimeError: The size of tensor a (750) must match the size of tensor b (25) at non-singleton dimension 0