Skip to content

backward gives a cryptic error message when using dataparallel #228

@soumith

Description

@soumith

Haven't dived in, but if one enables the data_parallel in dcgan's netD, this is an error we get in backward:

Traceback (most recent call last):
  File "main.py", line 230, in <module>
    errG.backward()
  File "/data/users/soumith/pytorch/torch/autograd/variable.py", line 92, in backward
    self._execution_engine.run_backward(self, gradient, retain_variables)
TypeError: backward() takes exactly 2 arguments (5 given)

Uncomment this line and run:
https://github.com/pytorch/examples/blob/dcgan/dcgan/main.py#L155-L158

python main.py --dataset lsun --dataroot ~/local/lsun/train --workers 1 --cuda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions