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

关于PaddleSeg中使用知识蒸馏报错images = data[0]的问题 #2899

Closed
1 task done
OroChippw opened this issue Jan 6, 2023 · 2 comments
Closed
1 task done
Labels
question Further information is requested triage new issue, waiting to be assigned

Comments

@OroChippw
Copy link

问题确认 Search before asking

  • 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

Traceback (most recent call last): File "slim/distill/distill_train.py", line 225, in main(args) File "slim/distill/distill_train.py", line 220, in main test_config=s_cfg.test_config, ) File "PaddleSeg-release-2.7/develop/slim/distill/distill_utils.py", line 183, in distill_train images = data[0] KeyError: 0
请问一下是我的配置文件出错,还是哪些地方不对,谢谢您~

@OroChippw OroChippw added the question Further information is requested label Jan 6, 2023
@github-actions github-actions bot added the triage new issue, waiting to be assigned label Jan 6, 2023
@OroChippw
Copy link
Author

已解决,data在seg中是个dict类型
将代码中的
images=data[0]
labels = data[1].astype('int64')
修改为
images=data['img']
labels = data['label'].astype('int64')
即可在paddleseg中进行知识蒸馏

@haoyuying
Copy link
Collaborator

您好,若您的问题解决,我们将关闭该issue, 若您有其他需求,可以重新打开本issue进行提问。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested triage new issue, waiting to be assigned
Projects
None yet
Development

No branches or pull requests

2 participants