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

The to.(self.device) in return #27

Closed
panjiashu opened this issue Jun 6, 2021 · 2 comments
Closed

The to.(self.device) in return #27

panjiashu opened this issue Jun 6, 2021 · 2 comments

Comments

@panjiashu
Copy link

The inputs.to(self.device) in ConformerConvmodule and FeedForwardModule will cause the network graph in tensorboard to fork and appear kind of messy. Is there any special reason to write like that? Since in most cases we should have send both the model and tensor to the device before we input the tensor to the model, probably no more sending action is needed?

@adobles96
Copy link

In addition to that it also breaks things when running on a computer w/o gpu. Even if you do model.cpu() that doesn't change the device attribute for the module & submodules, so when you hit a inputs.to(self.device) it tries to convert to cuda (the default value for device) and crashes.

@sooftware
Copy link
Owner

resolved #28

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

3 participants