You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/06/19 00:32:46 UTC
[GitHub] jonomon opened a new issue #11329: Cannot call data() on parameters
initialized on multiple GPUs
jonomon opened a new issue #11329: Cannot call data() on parameters initialized on multiple GPUs
URL: https://github.com/apache/incubator-mxnet/issues/11329
When attempting to access data (using the .data() function) in layers that were initialized on multiple GPUs, the following error message is shown:
```
Parameter 'dense0_weight' was not initialized on context cpu(0). It was only initialized on [gpu(0), gpu(1)].
```
## Minimum reproducible example
Example of code that has layers initialized on multiple GPUs. This code crashes.
```python code
import mxnet as mx
from mxnet import nd, autograd, gluon
net = mx.gluon.nn.Dense(2, in_units=10)
net.initialize(ctx=[mx.gpu(0), mx.gpu(1)])
net.weight.data()
```
Example of code that has layers initialized on a single GPU. This doesn't crash.
```python code
net = mx.gluon.nn.Dense(2, in_units=10)
net.initialize(ctx=mx.gpu())
net.weight.data()
```
## Environment info
* mxnet version = 1.2.0
* python version 3.6
* on ubuntu 16.04.4
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services