Skip to content

[TFLite] KeyError: 'conv2d/Kernel' on test_forward_mediapipe_hand_landmark() #5774

@leandron

Description

@leandron

After #5682, we're now seeing the error below on test_forward_mediapipe_hand_landmark. I think that it is not seen on upstream CI because of file caching. As I ran this test, master points at c7274fd3b0f693fc6214a450e13d5e99026337ae.

This is the error:

_____________________ test_forward_mediapipe_hand_landmark _____________________

    def test_forward_mediapipe_hand_landmark():
        """Test MediaPipe 2D hand landmark TF Lite model."""
        # MediaPipe 2D hand landmark TF
        tflite_model_file = download_testdata(
            "https://github.com/google/mediapipe/raw/master/mediapipe/models/hand_landmark.tflite",
            "hand_landmark.tflite")
        with open(tflite_model_file, "rb") as f:
            tflite_model_buf = f.read()
        data = np.random.uniform(size=(1, 256, 256, 3)).astype('float32')
        tflite_output = run_tflite_graph(tflite_model_buf, data)
>       tvm_output = run_tvm_graph(tflite_model_buf, data, 'input_1', num_output=2)

tests/python/frontend/tflite/test_forward.py:2451: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/python/frontend/tflite/test_forward.py:136: in run_tvm_graph
    dtype_dict=dtype_dict)
python/tvm/relay/frontend/tflite.py:2712: in from_tflite
    op_converter.convert_op_to_relay()
python/tvm/relay/frontend/tflite.py:185: in convert_op_to_relay
    ret = self.convert_map[op_code_str](op)
python/tvm/relay/frontend/tflite.py:2454: in convert_dequantize
    in_expr = self.get_expr(input_tensor.tensor_idx)
python/tvm/relay/frontend/tflite.py:2563: in get_expr
    return self.exp_tab.get_expr(get_tensor_name(self.subgraph, input_tensor_idx))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tvm.relay.frontend.common.ExprTable object at 0x7f244ac74f28>
name = 'conv2d/Kernel'

    def get_expr(self, name):
>       return self.exprs[name]
E       KeyError: 'conv2d/Kernel'

python/tvm/relay/frontend/common.py:294: KeyError
----------------------------- Captured stdout call -----------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions