In mxnet 1.4 using the Python API, suppose I do
import mxnet as mx tmp = mx.sym.var('a') print(tmp) # <Symbol a> tmp = tmp + tmp print(tmp) # <Symbol _plus0> tmp = mx.sym.var('b') tmp = tmp + tmp print(tmp) # <Symbol _plus1>
<Symbol _plus0> is still present in the graph somewhere. How can I list all symbols which currently live in my graph?
I would like to do something like
viz module to plot the network. You can also save the symbol graph to a json file and peruse the json file to view all the symbols -
import mxnet as mx a = mx.sym.Variable('a') b = mx.sym.Variable('b') c = a + b d = a * b # matrix multiplication e = mx.sym.dot(a, b) # reshape f = mx.sym.reshape(d+e, shape=(1,4)) # plot f.save('fgraph-symbol.json') mx.viz.plot_network(symbol=f)