Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

LSTM seq length cast node is causing error while removing unused nodes #489

Closed
@buddhapuneeth

Description

@buddhapuneeth

_remove_unused_nodes() is failing for my model. Unfortunately, I can't share you the model.

assert in_ == '' or in_ in input_dict

(https://github.com/onnx/keras-onnx/blob/master/keras2onnx/topology.py#L230)

Above check is failing me. My values are:

>in_
'masking_1/Any_1:0'
>in_ in input_dict
False

This check was part of the recent change #466

Screen Shot 2020-05-14 at 10 16 59 AM

you can see the 'masking_1/Any_1:0' was input of 'cast' node which was build at:
https://github.com/onnx/keras-onnx/blob/master/keras2onnx/ke2onnx/lstm.py#L291

def build_sequence_lengths(scope, operator, container):

I am assuming 'masking_1/Any_1:0' to be part of 'input_dict' in _remove_unused_nodes() but is not the case.

Shouldn't we add cast input here into container.add_initializer()?
Env: Keras 2.3.1, keras-onnx master (as of May12th 2020), Py 36

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions