Incubator-mxnet: element-wise variable and matrix product

Created on 21 Oct 2016  路  3Comments  路  Source: apache/incubator-mxnet

I find there is no operation that supporting ndarray and variable production, is there any other solution?
`
vae = mx.sym.Variable("vae")

data = mx.sym.SliceChannel(data = vae, num_outputs = 2)
mean = data[0]
stddev = data[1]
label = mx.sym.Variable("label")
epsilon = mx.random.normal(0,1,(batch_size,16,))
stddev2 = mx.sym.sqrt(mx.sym.exp(stddev))
input_data = mean+ stddev2*epsilon
//input_data = mean+ mx.sym.broadcast_mul(stddev2,epsilon)`

Most helpful comment

use mx.sym.normal
use can use random in symbol graphs

All 3 comments

You can declare epsilon to be a shape (1,) variable, and generate that random number from your data iter.

@pluskid many thanks. So that mean mxnet has no such kind of operation by now?

use mx.sym.normal
use can use random in symbol graphs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ajoo picture Ajoo  路  3Comments

yuconglin picture yuconglin  路  3Comments

xzqjack picture xzqjack  路  3Comments

sbodenstein picture sbodenstein  路  3Comments

dmadeka picture dmadeka  路  3Comments