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

Errors when I try to run train.py #40

Open
puppy2000 opened this issue Mar 14, 2022 · 2 comments
Open

Errors when I try to run train.py #40

puppy2000 opened this issue Mar 14, 2022 · 2 comments

Comments

@puppy2000
Copy link

I follow the insturction and run: CUDA_VISIBLE_DEVICES=0 python train.py
but I get
TypeError: empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType), but expected one of:

  • (tuple of ints size, *, tuple of names names, torch.memory_format memory_format, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
  • (tuple of ints size, *, torch.memory_format memory_format, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)

what's wrong with this code?

@chendi77
Copy link

Did you find the solution?

@Surayuth
Copy link

Surayuth commented May 31, 2022

Edit ResidualBlock in basic_layers.py by replacing all / with //.
For example, in line 16, you should write as

self.conv1 = nn.Conv2d(input_channels, output_channels//4, 1, 1, bias = False)

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