Skip to content

Conversation

Paul-Walcher
Copy link

In trainer.py in the function "_set_device", the comparison to determine whether to use cpu or gpu is done inside the loop with the variable "device_type". If "device_type" is -1, "cpu" would have been added to the list of devices.

However, if "device_type" is -1, an error would have been thrown beforehand, since we tried to iterate over -1.

I assume this is a typo, so changing the variable to compare from "device_type" to the local variable "device" will probably have the intended behaviour.

In trainer.py renamed "device_type"-variable inside comparison to "device".
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

Successfully merging this pull request may close these issues.

1 participant