[Solved] Recreate the super_resolution.onnx neural network graph using nnvm


#1

Hi,
I am trying to know the configuration of loaded graph using nnvm.frontend. It gives 2 outputs symbol and param. Looking at them I can guess that symbol contains the operations and param contains the values(weights maybe), but it is very difficult to tell which node is connected to which one and what operation is being performed on a given node.
When I run:

print(params.keys())

output:
[u'3', u'2', u'5', u'4', u'7', u'6', u'9', u'8']
What are the upper values?

and

print(params.values())

gives

<tvm.NDArray shape=(64,), cpu(0)>
    array([ 0.01281657,  0.08157352,  0.02290743,  0.00681615, -0.19692652,
           -0.02093611,  0.11872759,  0.13638875,  0.16250217, -0.01993841,
            0.01584065,  0.07351515, -0.0955466 , -0.0593719 ,  0.18998739,
...
<tvm.NDArray shape=(64, 1, 5, 5), cpu(0)>
array([[[[ 0.0898287 , -0.17170157, -0.23334111,  0.23690398,
		   0.11007133],
		 [ 0.06246122,  0.18415792, -0.34047008, -0.06000333,
		  -0.11732369],
...
<tvm.NDArray shape=(64,), cpu(0)>
array([-1.6531553e-02, -3.6794998e-02, -2.4077992e-05,  3.4607138e-02,
      2.6169471e-02, -2.2110524e-02,  2.1955179e-02,  1.8828548e-02...
...
<tvm.NDArray shape=(64, 64, 3, 3), cpu(0)>
array([[[[ 1.19588703e-01, -6.93409145e-02, -1.49491638e-01],
         [-8.48586783e-02,  4.49241102e-02,  2.94817165e-02],
...
<tvm.NDArray shape=(32,), cpu(0)>
array([ 0.02135039,  0.00863128,  0.01683474,  0.02714609, -0.03697739,
        0.10127458, -0.0178573 , -0.03363523,  0.02020296,  0.0198525 ,
...
<tvm.NDArray shape=(32, 64, 3, 3), cpu(0)>
array([[[[-1.40260175e-01,  4.71879959e-01,  1.35231748e-01],
...
<tvm.NDArray shape=(9,), cpu(0)>
array([-0.0151069 , -0.01908834, -0.03623821, -0.02244801,
...
<tvm.NDArray shape=(9, 32, 3, 3), cpu(0)>
array([[[[-6.9734879e-02,  1.0056845e-01, -4.6930072e-01],
         [-3.8451529e-01, -3.3979353e-01,  6.7976254e-01],
...

How they can be read?