troyliu0105 opened a new issue #19650:
URL: https://github.com/apache/incubator-mxnet/issues/19650
## Description
I want to make a GAM for symbol block. I just wonder whether here exists an
api to do this, like below:
```python
ipt = mx.sym.var('data')
out = net(ipt)
internal = out.get_internals(internal_name)
grad_op = mx.sym.get_grad(internal)
net = SymbolBlock(mx.sym.Group([grad_op, out]), ipt, net.collect_params())
data = mx.nd.random_uniform(shape=(1, 3, 224, 224))
with autograd.record():
output = net(data)
output[1].backward()
# and you can retrieve grad of "internal"
internal_grad = output[0]
```
😃
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]