matteosal edited a comment on issue #16555: Upgrade MKL-DNN dependency to v1.0
URL: https://github.com/apache/incubator-mxnet/pull/16555#issuecomment-547000155
 
 
   `RNN` has inconsistent output in training mode. The following script prints 
a nonzero array:
   ```
   import mxnet as mx
   
   sym = mx.sym.RNN(
        mx.symbol.Variable('input'),
        mx.symbol.Variable('weights'),
        mx.symbol.Variable('state'),
        state_size = 4,
        num_layers = 1,
        mode = 'gru'
   )
   ex = sym.bind(mx.cpu(),
        {
                "input": mx.ndarray.random.uniform(low = 0, high = 1, shape = 
(3, 1, 2)),
                "weights": mx.ndarray.random.uniform(low = 0, high = 1, shape = 
(96)),
                "state": mx.nd.zeros([1, 1, 4]),
        }
   )
   
   ex.forward(is_train=True)
   res1 = ex.outputs[0].asnumpy()
   ex.forward(is_train=True)
   res2 = ex.outputs[0].asnumpy()
   
   print(res1 - res2)
   ```
   This also happens if MKL-DNN is disabled by env var, but it doesn't happen 
on master (built with MKL-DNN)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to