Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

plot_network issue with LRN  #10282

Description

@ThomasDelteil

There is an issue in master that is not present in 1.1.0

Plotting the network on this tutorial:
http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-10165/10/tutorials/onnx/inference_on_onnx_model.html
Fails with this error:

KeyErrorTraceback (most recent call last)
<ipython-input-15-3112c78b14de> in <module>()
----> 1 mx.visualization.plot_network(sym, shape={"input_0":inputs[0].shape}, node_attrs={"shape":"oval","fixedsize":"false"})

/home/ubuntu/anaconda3/envs/mxnet_p27/lib/python2.7/site-packages/mxnet/visualization.pyc in plot_network(symbol, title, save_format, shape, node_attrs, hide_weights)
    342                                 if "num_outputs" in params:
    343                                     key += str(int(params["num_outputs"]) - 1)
--> 344                             shape = shape_dict[key][1:]
    345                             label = "x".join([str(x) for x in shape])
    346                             attr["label"] = label

KeyError: u'lrn0_output'

The issue was introduced before mxnet==1.2.0b20180221

It is related to the fact that the LRN layer does not have an output, whilst in 1.1.0 I can do
sym.get_internals()['lrn0_output']

The issue was introduced by this PR and this commit c3e3a83:
#9677

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions