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

请问DETR模型在训练和推理过程中,inputs中的numpy类型的数据是在哪个函数中被转为tensor的? #8286

Closed
1 task done
xuewenyuan opened this issue May 26, 2023 · 4 comments
Labels
question Further information is requested status/close

Comments

@xuewenyuan
Copy link

问题确认 Search before asking

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

请提出你的问题 Please ask your question

如题,在ppdet下翻了很多文件也没看到

@xuewenyuan xuewenyuan added the question Further information is requested label May 26, 2023
@lyuwenyu
Copy link
Collaborator

这个是dataloader内部做的

@xuewenyuan
Copy link
Author

@lyuwenyu
我在构造自定义的数据集和数据预处理时,使用paddle.Tensor类型也可以吧?还是说,我给dataloader的数据必须时numpy类型的

@lyuwenyu
Copy link
Collaborator

可以是numpy 也可以是tensor,,如果不想用默认的可以写个自定义的collate_fn

@xuewenyuan
Copy link
Author

@lyuwenyu
好的,谢谢。主要是,我需要对input的数据进行一个插值操作,使用tensor的interpolate比使用numpy更方便~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested status/close
Projects
None yet
Development

No branches or pull requests

2 participants