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

trainer can't work #19

Closed
Sakura4036 opened this issue Nov 18, 2022 · 10 comments
Closed

trainer can't work #19

Sakura4036 opened this issue Nov 18, 2022 · 10 comments

Comments

@Sakura4036
Copy link

when I try to run this trainer , .next() can't run

-> "AttributeError: 'dict_keyiterator' object has no attribute 'next'"

I use:
python=3.7
torch=11.3

This method has been deleted in python 3?
Why not use next(iter)?

or what should I do to fix it?

image
image

@Baijiong-Lin
Copy link
Collaborator

Please change torch from version 1.13 to 1.8. It can run.

@Sakura4036
Copy link
Author

OK, thanks. I can try it later.

@Sakura4036
Copy link
Author

I change env to torch 1.8.0, still same error!

image
image

@Baijiong-Lin
Copy link
Collaborator

What is your run command? Can you run the example like office-31 successfully?

@Sakura4036
Copy link
Author

No, I can't , same error

Uploading image.png…

@Sakura4036
Copy link
Author

image

@Baijiong-Lin
Copy link
Collaborator

Baijiong-Lin commented Nov 18, 2022

Office-31 is a multi-input MTL problem where each task has its own input data, thus multi_input should be set as True as follows:
python train_office.py --multi_input

Please refer to Docs and README for more detail.

@Sakura4036
Copy link
Author

it can run!

I checked my Dataset and Dataloader, it's similar to the dataset used in LibMTL , it seems no problem

Then what other problems may cause this error?

@Baijiong-Lin
Copy link
Collaborator

Do you mean there is still an error when applying LibMTL to your own dataset? Have you defined your own Dataset and Dataloader correctly? Please refer to Docs for the detail about applying LibMTL to a new dataset.

@Sakura4036
Copy link
Author

OK,thanks, I will try it later

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