[quote="alopez_13, post:7, topic:6578"]
This is part of the Relay code:

```
  %0 = layout_transform(%input, src_layout="NHWC", dst_layout="NCHW");
  %1 = layout_transform(%v_param_1, src_layout="HWIO", dst_layout="OIHW");
  %2 = qnn.conv2d(%0, %1, 128, 122, 0.0078125f, 0.0339689f, strides=[2, 2], 
padding=[0, 0, 1, 1], channels=32, kernel_size=[3, 3], out_dtype="int32") an 
internal invariant was violated while typechecking your program [09:34:19] 
/Users/alopez/Documents/Code/tvm/src/relay/qnn/op/convolution.cc:50: Check 
failed: data->dtype == DataType::Int(8) || data->dtype == DataType::UInt(8): 
Expected qnn conv2d type(int8, uint8) for input but was float32
  %3 = expand_dims(%v_param_2, axis=0, num_newaxis=3);
  %4 = layout_transform(%3, src_layout="NHWC", dst_layout="NCHW");
  %5 = add(%2, %4);
  %6 = qnn.requantize(%5, 0.000265382f, 0, 0.0235285f, 0, axis=1, 
out_dtype="uint8
```
[/quote]

If you see the error that  `qnn.conv2d` input dtype is `float32`, it means that 
the primary input `input` is `float32`. This means that `input` dtype is set 
incorrectly.





---
[Visit 
Topic](https://discuss.tvm.ai/t/autotvm-task-extract-from-program-in-tflite/6578/13)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/d9a4717bec493800d273ed6163e9e9f5583350f47489afaa3445725dad2ea44b).

Reply via email to