First of all, I'm not sure if it should be posted here.
If there is an error, please forgive me.
I want to try ethus-U NPU. (developer.arm.com/.../The-Vela-compiler
Therefore I need to use the vela compiler (pypi.org/.../)
I use the example of the following website to make a tflite (www.tensorflow.org/.../post_training_integer_quant)
Then use vela compiler to compile tflite, and then see this warning
Warning: PACK 'sequential/reshape/Reshape/shape' is not supported on the NPU. Placing on CPU instead - Input(s) and Output tensors must not be dynamic Op has dynamic tensor(s): sequential/reshape/strided_slice2 Warning: STRIDED_SLICE 'sequential/reshape/strided_slice2' is not supported on the NPU. Placing on CPU instead - Input(s) and Output tensors must not be dynamic Op has dynamic tensor(s): sequential/reshape/strided_slice2
I'm not sure what does ''dynamic'' mean for this compiler?
This code comes from part of the example mentioned above:
model = tf.keras.Sequential([ tf.keras.layers.InputLayer(input_shape=(28, 28)), tf.keras.layers.Reshape(target_shape=(28,28,1),input_shape=(28,28,1)), tf.keras.layers.Conv2D(filters=12, kernel_size=(3,3),activation='relu'), tf.keras.layers.MaxPool2D(pool_size=(2, 2)), tf.keras.layers.Flatten(), tf.keras.layers.Dense(10) ])
I’m not sure if this is the case for functions like reshpae, or it’s my coding problem.
I found that my question is similar to tensorflow/tensorflow#45090 (comment)
This problem seems to be related to dynamic size in keras.
So there is this warning " Input(s) and Output tensors must not be dynamic "
So you must fix the batch size of input layer before tflite conversion