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

Not working on cpu #179

Open
yazdaniamir38 opened this issue Dec 15, 2021 · 1 comment
Open

Not working on cpu #179

yazdaniamir38 opened this issue Dec 15, 2021 · 1 comment

Comments

@yazdaniamir38
Copy link

Hi,
I tried to use get my model summary on cpu by:

summary(model, input_size=(1,200, 200),device=torch.device('cpu'))

But I get the following error:
AttributeError: 'torch.device' object has no attribute 'lower'.

My troch version is 1.10.0.

@gagank1
Copy link

gagank1 commented Apr 28, 2022

I'm seeing the same issue. It looks like there's a discrepancy between the version of torchsummary on pip and the version on this repo. The one on pip expects a string.

This is the function signature for summary from pip:
def summary(model, input_size, batch_size=-1, device="cuda"):

and this is the one on this repo:
def summary(model, input_size, batch_size=-1, device=torch.device('cuda:0'), dtypes=None):

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