Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to conver to tflite #26

Open
fangxiaoying opened this issue Aug 9, 2021 · 0 comments
Open

how to conver to tflite #26

fangxiaoying opened this issue Aug 9, 2021 · 0 comments

Comments

@fangxiaoying
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant