-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
where processor should i put in a training code? #13427
Comments
I have a problem during writing a train code in pytorch.I want to create a custom Dataset for coco image_caption dataset such as follow:
2.then overwrite getiem(self,idx) where i used processor to process a tuple of (image, text) sample
3.or __getitem__return a pair of raw (image, text) sample, and use processor in a custom collate_fn like:
then pass collate_fn as a parameter to dataloader |
This issue is not of relevance to transformers repository please post this in pytorch forums for quick help |
I think processor is a base method of transformers which should be concerned in transformers' tutorials |
You could put the processor anywhere you want either in the dataset or collate_fn. If processing on the fly, then I would put it in the |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Hi @lycfight could you please open an issue with a minimal code snippet so we could take a look. Thanks :)
Originally posted by @patil-suraj in #11445 (comment)
The text was updated successfully, but these errors were encountered: