You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by Ravish via Apache TVM Discuss <no...@discuss.tvm.ai> on 2020/11/04 09:02:23 UTC
[Apache TVM Discuss] [Questions] Cannot squeeze axis with dimension
not equal to 1
I have trained LSTM network and want to do a performance comparison between Keras and TVM on my personal laptop CPU. For that, I am using 10 values to pass through the network directly.
data shape is [10,1,6]
######################################################################
#model is loaded from the .h5 file
data = test_X[0:10,:,:]
shape_dict = {"lstm_1_input": data.shape}
mod, params = relay.frontend.from_keras(model, shape_dict)
# compile the model
target = "llvm"
ctx = tvm.cpu(0)
with tvm.transform.PassContext(opt_level=3):
executor = relay.build_module.create_executor("graph", mod, ctx, target)
print("Test Data Shape = ",data.shape)
dtype = "float32"
data2 = data.astype(dtype)
tvm_out = executor.evaluate()(tvm.nd.array(data2), **params)
print(tvm_out)
top1_tvm = np.argmax(tvm_out.asnumpy()[0])
######################################################################
For the above code, I am getting below error
Check failed: *axis_ptr == 1 (10 vs. 1) : cannot squeeze axis with dimension not equal to 1.
Its basically feeding the TVM multiple inputs simultaneously.
---
[Visit Topic](https://discuss.tvm.apache.org/t/cannot-squeeze-axis-with-dimension-not-equal-to-1/8370/1) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/5619f4c832146e46a7b89726fa8ad6f2bfd7dfc91f9a3c28f3d4cebae9725601).
[Apache TVM Discuss] [Questions] Cannot squeeze axis with dimension
not equal to 1
Posted by Ravish via Apache TVM Discuss <no...@discuss.tvm.ai>.
Nothing @myuniqueusername, I am also are waiting for reply. Please let me know if you find something.
---
[Visit Topic](https://discuss.tvm.apache.org/t/cannot-squeeze-axis-with-dimension-not-equal-to-1/8370/3) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/e95a41d6c29275d1bdcf10ce4d8ebc31f16369afae5479de99029393f5a5a573).
[Apache TVM Discuss] [Questions] Cannot squeeze axis with dimension
not equal to 1
Posted by myuniqueusername via Apache TVM Discuss <no...@discuss.tvm.ai>.
Hi,
I have exactly the same problem with LSTM.
Any news on the topic please?
---
[Visit Topic](https://discuss.tvm.apache.org/t/cannot-squeeze-axis-with-dimension-not-equal-to-1/8370/2) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/06844d64fb7aecfaa670f8403295878f9aeece308020d05d9c09bcf8b5dcc7f0).