input size and weight size are mismatched

使用TVM转tflite模型时,报如下错误:

File "xxx/python/tvm/relay/frontend/tflite.py", line 729, in convert_fully_connected
    "input size and weight size are mismatched"

AssertionError: input size and weight size are mismatched

经排查,使用了超过二维的keras的Dense层,tvm转模型时,只支持包括batch维度在内2维的全连接,可以用1x1的Conv2d替代全连接,然后reshape,再输出

猜你喜欢

转载自blog.csdn.net/bcfd_yundou/article/details/103530419