You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
torchinfo.summary should not change the device of model
To Reproduce
model = model.cpu()
torchinfo.summary(model)
why model was changed to cuda after calling torchinfo.summary() if I have a GraphicCard, It was Unexpected. I just want to dump the structure of my model.
Expected behavior
torchinfo.summary should keep the status of model, not change it.
the param "device" of the function torchinfo.summary is not necessary.
Desktop (please complete the following information):
OS: Windows11
The text was updated successfully, but these errors were encountered:
The culprit seems to be get_device() function called in the summary().
This function does not consider mps device and device is set as cpu even when model parameters' device is mps.
Describe the bug
torchinfo.summary should not change the device of model
To Reproduce
model = model.cpu()
torchinfo.summary(model)
why model was changed to cuda after calling torchinfo.summary() if I have a GraphicCard, It was Unexpected. I just want to dump the structure of my model.
Expected behavior
torchinfo.summary should keep the status of model, not change it.
the param "device" of the function torchinfo.summary is not necessary.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: