leandron opened a new issue #5682:
URL: https://github.com/apache/incubator-tvm/issues/5682


   With the latest update to the `hand_landmark.tflite` network (publicly 
announced 
[here](https://twitter.com/googleai/status/1265319835283537921?s=21)), it is 
causing `test_forward_mediapipe_hand_landmark()` test to fail with 
`tvm.error.OpNotImplemented: The following operators are not supported in 
frontend TFLite: 'DEQUANTIZE'`.
   
   I guess we don't see it on CI because the old version of this file is 
probably cached on the machine. Running tests from scratch (without cached 
files) will make the issue reproduce.
   
   This is the error we see:
   ```
    =================================== FAILURES 
===================================
    _____________________ 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:2220: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    tests/python/frontend/tflite/test_forward.py:110: in run_tvm_graph
        dtype_dict=dtype_dict)
    python/tvm/relay/frontend/tflite.py:2606: in from_tflite
        op_converter.check_unsupported_ops()
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
    
    self = <tvm.relay.frontend.tflite.OperatorConverter object at 
0x7fd4703a2fd0>
    
        def check_unsupported_ops(self):
            """Check unsupported TFLite ops in our converter."""
            unsupported_ops_set = set()
        
            for op_idx in range(self.subgraph.OperatorsLength()):
                op = self.subgraph.Operators(op_idx)
                op_code_str = self.get_op_code_str(op)
                if op_code_str not in self.convert_map:
                    unsupported_ops_set.add(op_code_str)
        
            if unsupported_ops_set:
                msg = 'The following operators are not supported in frontend ' \
                      'TFLite: {}'
                ops = str(list(unsupported_ops_set)).strip('[,]')
    >           raise tvm.error.OpNotImplemented(msg.format(ops))
    E           tvm.error.OpNotImplemented: The following operators are not 
supported in frontend TFLite: 'DEQUANTIZE'
    
    python/tvm/relay/frontend/tflite.py:165: OpNotImplemented
    ----------------------------- Captured stdout call 
-----------------------------
    Downloading from url 
https://github.com/google/mediapipe/raw/master/mediapipe/models/hand_landmark.tflite
 to /workspace/.tvm_test_data/hand_landmark.tflite
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to