Giter Site home page Giter Site logo

Comments (5)

AliaksandrSiarohin avatar AliaksandrSiarohin commented on May 25, 2024

Specify what coomand are you running and full stack trace.

from first-order-model.

JonathanMaluf avatar JonathanMaluf commented on May 25, 2024

Hi,
Here is the full output with the command at the top:

The only changes I made to the vox-256 config was the number of blocks (for the kp_detector) and the batch size.

$ CUDA_VISIBLE_DEVICES=0 python3 run.py --config config/vox-256.yaml --device_ids 0

/usr/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
Use predefined train-test split.
Training...
  0%|                                                                                                                                                  
| 0/10 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "run.py", line 77, in <module>
    train(config, generator, discriminator, kp_detector, opt.checkpoint, log_dir, dataset, opt.device_ids)
  File "/home/ulysses/first-order-model/train.py", line 51, in train
    losses_generator, generated = generator_full(x)
  File "/home/ulysses/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/ulysses/.local/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 141, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/home/ulysses/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/ulysses/first-order-model/modules/model.py", line 152, in forward
    kp_source = self.kp_extractor(x['source'])
  File "/home/ulysses/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/ulysses/first-order-model/modules/keypoint_detector.py", line 53, in forward
    feature_map = self.predictor(x)
  File "/home/ulysses/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/ulysses/first-order-model/modules/util.py", line 197, in forward
    return self.decoder(self.encoder(x))
  File "/home/ulysses/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/ulysses/first-order-model/modules/util.py", line 181, in forward
    out = torch.cat([out, skip], dim=1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 7 and 6 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:83

from first-order-model.

AliaksandrSiarohin avatar AliaksandrSiarohin commented on May 25, 2024

What number of blocks you chose?
What dataset you use? Is all the images are of the same size? Which size?

from first-order-model.

JonathanMaluf avatar JonathanMaluf commented on May 25, 2024

I was able to fix the error by using the default video size of 256x256.
My dataset had image sizes of 250x250, even though I specified the change in the config file.

Is there a reason that only 256x256 works?

from first-order-model.

AliaksandrSiarohin avatar AliaksandrSiarohin commented on May 25, 2024

Unet architecture cannot handle inputs that is not divisible by the 2**num_blocks. Because skip connections assume that the sizes of feature maps is the same.

from first-order-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.