0

Trying to understand some Scala's code on network training in MXNet.

I believe you can access gradient on the executor in Scala by calling networkExecutor.gradDict("data"), what would be equivalent of it in Python MXNet?

Thanks!

Stanley Kirdey
  • 602
  • 5
  • 20

1 Answers1

1

How about grad_dict in executor? It returns a dictionary representation of the gradient arrays.

  • I think I've found a way to do it with existing API by calling get_input_grads, that are being computed after a call to do back propagation. It doesn't work by a key, but it will return an array of gradients consistent with the data input objects. http://mxnet.io/api/python/module.html#mxnet.module.BaseModule.get_input_grads – Stanley Kirdey Jul 18 '17 at 18:03