haoyang9804 commented on issue #14917: URL: https://github.com/apache/tvm/issues/14917#issuecomment-1711898110
Actually, this is not a TVM's issue, but actually a feature (though I feel this feature is weird...) According to [this tutorial](https://tvm.apache.org/docs/how_to/compile_models/from_keras.html), you should first reshape the input data to cater for TVM's preference for data layout (i.e., NCHW). Specifically, you should write `shape_dict = {'input_1': (input_shape[0], input_shape[3], input_shape[1], input_shape[2])}`. Or, you can just ignore TVM's preference by writing `mod, params = relay.frontend.from_keras(model, shape_dict,layout='NHWC'). But this way you will receive TVM's yelling like `conv2d NHWC layout is not optimized for x86 with autotvm.` ` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
