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

Device placement decision #25

Open
raffeyC opened this issue Nov 26, 2024 · 0 comments
Open

Device placement decision #25

raffeyC opened this issue Nov 26, 2024 · 0 comments
Assignees

Comments

@raffeyC
Copy link
Collaborator

raffeyC commented Nov 26, 2024

Unlike tensorflow, pytorch has a device system where models and data need to be placed explicitly on device before training can happen.
So, either the model or the application needs to accommodate this.
Pytorch models don't inherently have device parameters, so we would need to add our own in this case. The issue here is that if we load a saved model and move to a different device, we would also need to explicitly change the self.device parameter. This might get annoying and lead to unexpected results when training with multiple gpus (if this occurs)
On the other hand, we could add device parameter to the app, this is much cleaner and probably the best way forward. However, in this case, old users will have to add device parameter when declaring the app, so again not perfect.

@raffeyC raffeyC self-assigned this Nov 26, 2024
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

1 participant