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

Run autoregressive code #15

Open
kstudy123 opened this issue Apr 5, 2023 · 1 comment
Open

Run autoregressive code #15

kstudy123 opened this issue Apr 5, 2023 · 1 comment

Comments

@kstudy123
Copy link

Hello, I would like to ask how to run the code in autoregressive form. I tried to run it with "--non_autoregressive" removed, and the code does show autoregressive form:
python training/transformer_model_fn.py \ --model_prefix=${POTR_OUT} \ --batch_size=16 \ --data_path=${H36M} \ --learning_rate=0.0001 \ --max_epochs=500 \ --steps_per_epoch=200 \ --loss_fn=l1 \ --model_dim=128 \ --num_encoder_layers=4 \ --num_decoder_layers=4 \ --num_heads=4 \ --dim_ffn=2048 \ --dropout=0.3 \ --lr_step_size=400 \ --learning_rate_fn=step \ --warmup_epochs=100 \ --pose_format=rotmat \ --pose_embedding_type=gcn_enc \ --dataset=h36m_v2 \ --pre_normalization \ --pad_decoder_inputs \ --pos_enc_alpha=10 \ --pos_enc_beta=500 \ --predict_activity \ --action=all

but the following error appears: What should I do please?
image
Traceback (most recent call last): File "../potr_main/training/transformer_model_fn.py", line 231, in <module> model_fn.train() File "../potr_main/training/../training/seq2seq_model_fn.py", line 308, in train eval_loss = self.evaluate_fn(e, _time)#eval() 这是画表吧 File "/opt/conda/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context return func(*args, **kwargs) File "../potr_main/training/../training/seq2seq_model_fn.py", line 524, in evaluate_h36m decoder_pred = self._model( File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "../potr_main/data/../models/PoseTransformer.py", line 203, in forward return self.forward_autoregressive( File "../potr_main/data/../models/PoseTransformer.py", line 421, in forward_autoregressive pose_code = self._pose_embedding(pred_pose) File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs) File "../potr_main/data/../models/PoseGCN.py", line 350, in forward B, S, D = x.size() ValueError: not enough values to unpack (expected 3, got 2)

@siyu-lii
Copy link

siyu-lii commented Nov 8, 2024

I have the same problem as you, can you tell me how you solved it? Thank you very much.

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