something error when i use it
2023-05-27 16:38:48.242776: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-05-27 16:38:48.288173: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-05-27 16:38:48.288582: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-05-27 16:38:48.962344: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
WARNING: The argument dynamic_input_shape=True
is not needed any more, onnxsim can now support dynamic input shapes natively, please refer to the
latest documentation. An error will be raised in the future.
Checking 0/1...
shape[0] of input "input_0" is dynamic, we assume it presents batch size and set it as 1 when testing. If it is not wanted, please set the it manually by --test-input-shape (see onnxsim -h
for the details).
2023-05-27 16:38:51.395079: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1956] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
WARNING:convolution_layers ::ConvTranspose with pad will lead output error to bigger, please check it out.
WARNING:convolution_layers ::ConvTranspose with pad will lead output error to bigger, please check it out.
Traceback (most recent call last):
File "/home/duyangfan/nxy/onnx2tflite-main/converter.py", line 108, in
run()
File "/home/duyangfan/nxy/onnx2tflite-main/converter.py", line 92, in run
onnx_converter(
File "/home/duyangfan/nxy/onnx2tflite-main/converter.py", line 21, in onnx_converter
keras_model = keras_builder(model_proto, native_groupconv)
File "/home/duyangfan/nxy/onnx2tflite-main/utils/builder.py", line 82, in keras_builder
tf_tensor[node_outputs[index]] = tf_operator(tf_tensor, onnx_weights, node_inputs, op_attr, index=index)(_inputs)
File "/home/duyangfan/nxy/onnx2tflite-main/layers/mathematics_layers.py", line 100, in call
out = tf.matmul(self.first_operand, self.second_operand)
File "/home/duyangfan/miniconda3/lib/python3.10/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/home/duyangfan/miniconda3/lib/python3.10/site-packages/keras/layers/core/tf_op_layer.py", line 119, in handle
return TFOpLambda(op)(*args, **kwargs)
File "/home/duyangfan/miniconda3/lib/python3.10/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
ValueError: Exception encountered when calling layer "tf.linalg.matmul" (type TFOpLambda).
Dimensions must be equal, but are 58 and 64 for '{{node tf.linalg.matmul/MatMul}} = BatchMatMulV2[T=DT_FLOAT, adj_x=false, adj_y=false](Placeholder, tf.linalg.matmul/MatMul/b)' with input shapes: [1,1,58,58], [64,64].
Call arguments received by layer "tf.linalg.matmul" (type TFOpLambda):
• a=tf.Tensor(shape=(1, 1, 58, 58), dtype=float32)
• b=array([[ 0.04544717, 0.07029884, 0.1148618 , ..., -0.11733958,
-0.05653606, 0.00598602],
[ 0.0400255 , 0.09087554, -0.03369874, ..., 0.11601257,
-0.11816581, -0.02627973],
[-0.05443765, -0.06790046, 0.07890876, ..., 0.01277761,
-0.03936964, -0.06176169],
...,
[ 0.02922536, 0.05941173, -0.11838005, ..., -0.07970631,
-0.02553718, 0.10650459],
[ 0.00736488, -0.11999485, 0.02790602, ..., 0.11965565,
0.11500892, 0.01097947],
[-0.12261999, -0.00388932, 0.04968777, ..., 0.05339718,
0.10601966, -0.11772572]], dtype=float32)
• transpose_a=False
• transpose_b=False
• adjoint_a=False
• adjoint_b=False
• a_is_sparse=False
• b_is_sparse=False
• output_type=None
• name=None
This was strange because my model didn't show any dimensional errors during training