Skip to content

nn.parallel.dataparallel errors on giving single GPU #234

@soumith

Description

@soumith
Traceback (most recent call last):
  File "main.py", line 204, in <module>
    output = netD(input)
  File "/data/users/soumith/pytorch/torch/nn/modules/module.py", line 198, in __call__
    result = self.forward(*input, **kwargs)
  File "main.py", line 158, in forward
    output = nn.parallel.data_parallel(self.main, input, gpu_ids)
  File "/data/users/soumith/pytorch/torch/nn/parallel/__init__.py", line 35, in data_parallel
    outputs = parallel_apply(replicas, inputs)
  File "/data/users/soumith/pytorch/torch/nn/parallel/parallel_apply.py", line 11, in parallel_apply
    assert len(modules) == len(inputs)
TypeError: object of type 'Variable' has no len()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions