Skip to content

how to conver to tflite #26

@fangxiaoying

Description

@fangxiaoying

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions