Skip to content

ModelSummary fails on the "generative_adversarial_net" example #2211

@johngull

Description

@johngull

🐛 Bug

When you run this example: https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pl_examples/domain_templates/generative_adversarial_net.py
you got error: RuntimeError: size mismatch, m1: [56 x 28], m2: [100 x 128]

My understanding by quick viewing of callstack:
Seems that problem in ModelSummary, which unfold 2 presented nn.Module to the same list of mods. And then it tries to push result of one module to the input of another layer, but this layers are not part of the same models.

To Reproduce

Just run example https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pl_examples/domain_templates/generative_adversarial_net.py

Environment

Python 3.7
PyTorch 1.3.1
pytorch-lightning 0.7.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedOpen to be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions