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

[Tip] Error in learning Tokenizer #49

Open
soonchanpark opened this issue Nov 25, 2024 · 0 comments
Open

[Tip] Error in learning Tokenizer #49

soonchanpark opened this issue Nov 25, 2024 · 0 comments

Comments

@soonchanpark
Copy link

Hi, i'm working with the code you shared. Thank you for your work.

In my evironment settings, I have met an error below when executing training code of Tokenizer.

Traceback (most recent call last):
  File "tools/train.py", line 175, in <module>
    main()
  File "tools/train.py", line 171, in main
    meta=meta)
  File "/opt/conda/lib/python3.7/site-packages/mmpose/apis/train.py", line 213, in train_model
    runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
  File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run
    epoch_runner(data_loaders[i], **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 53, in train
    self.run_iter(data_batch, train_mode=True, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 32, in run_iter
    **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/mmcv/parallel/data_parallel.py", line 77, in train_step
    return self.module.train_step(*inputs[0], **kwargs[0])
  File "/opt/conda/lib/python3.7/site-packages/mmpose/models/detectors/base.py", line 106, in train_step
    loss, log_vars = self._parse_losses(losses)
  File "/opt/conda/lib/python3.7/site-packages/mmpose/models/detectors/base.py", line 51, in _parse_losses
    for loss_name, loss_value in losses.items():
AttributeError: 'tuple' object has no attribute 'items'

In conclusion, compatilbility between pct_detector.py and mmpose==0.29.0 has problem. To solve the error, i modify the code in mmpose/models/detectors/base.py, function train_step, "losses = self.forward(**data_batch, return_loss=True) to run train forward which output losses.

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

1 participant