DSFD-tensorflow
DSFD-tensorflow copied to clipboard
how to conver to tflite
I want to convert Lightnet_0.75 to tflite and quant to deploy it on NPU.
input_shape=(320,320,3)
saved_model_dir='./model/Lightnet_0.75/detector' saved_model_dir_for_lite=saved_model_dir+'lite_pre'
we build the tflite version detect firstly, then save it
model=DSFDLite(input_shape) model.load_weights(saved_model_dir+'/variables/variables') tf.saved_model.save(model,saved_model_dir_for_lite)
print('the model rebuild over, ')
but meet error.ValueError: Tensor's shape (1, 1, 16, 32) is not compatible with supplied shape (1, 1, 24, 24)
How to fix? thank!