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

How to train on large images? #95

Open
universewill opened this issue Aug 24, 2021 · 0 comments
Open

How to train on large images? #95

universewill opened this issue Aug 24, 2021 · 0 comments

Comments

@universewill
Copy link

I change the load_size and crop_size to 512 in train_facades.sh, and get error.
I want to train on large image size, how to do that?

Traceback (most recent call last):
  File "./train.py", line 48, in <module>
    model.optimize_parameters()   # calculate loss functions, get gradients, update network weights
  File "gxl/BicycleGAN/models/bicycle_gan_model.py", line 209, in optimize_parameters
    self.forward()
  File "gxl/BicycleGAN/models/bicycle_gan_model.py", line 106, in forward
    self.z_encoded, self.mu, self.logvar = self.encode(self.real_B_encoded)
  File "gxl/BicycleGAN/models/bicycle_gan_model.py", line 82, in encode
    mu, logvar = self.netE.forward(input_image)
  File "miniconda3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 159, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "gxl/BicycleGAN/models/networks.py", line 647, in forward
    output = self.fc(conv_flat)
  File "miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "miniconda3/lib/python3.7/site-packages/torch/nn/modules/container.py", line 117, in forward
    input = module(input)
  File "miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "miniconda3/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 93, in forward
    return F.linear(input, self.weight, self.bias)
  File "miniconda3/lib/python3.7/site-packages/torch/nn/functional.py", line 1690, in linear
    ret = torch.addmm(bias, input, weight.t())
RuntimeError: mat1 dim 1 must match mat2 dim 0
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