torch / nngraph

Graph Computation for nn
Other
299 stars 96 forks source link

gradInput is nil when training with multiple GPUs with DataParallelTable #143

Closed bearpaw closed 7 years ago

bearpaw commented 7 years ago

Hi all,

When training on a single GPU, the gradInput is returned correctly after calling :backward.

However, when using with DataParallelTable , the gradInput is nil after backward. Is this a bug of nngraph when using with DataParallelTable?

bearpaw commented 7 years ago

I found it is related to DataParallelTable. The gradInput in DataParallelTable is actually saved as gradInputGpu from the source code