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

Quantization Layer Not supported: Softmax and constant (AIV-702) #168

Closed
raprakashvi opened this issue Jul 25, 2024 · 2 comments
Closed

Comments

@raprakashvi
Copy link

raprakashvi commented Jul 25, 2024

Hi,
I am following the tutorial https://blog.espressif.com/hand-gesture-recognition-on-esp32-s3-with-esp-deep-learning-176d7e13fd37 and have been getting issue on quantization step.

My python version is 3.7 and whenever I get to quantization , I get the error:
Generating the quantization table:
Constant is not supported on esp-dl yet
LogSoftmax is not supported on esp-dl yet


My layers are simple and as shown below:
model = Sequential()
model.add(Conv2D(32, (5, 5), activation='relu', input_shape=(96, 96, 1)))
model.add(MaxPooling2D((2, 2)))
model.add(Dropout(0.2))
model.add(Conv2D(64, (3, 3), activation='relu'))
model.add(MaxPooling2D((2, 2)))
model.add(Dropout(0.2))
model.add(Conv2D(64, (3, 3), activation='relu'))
model.add(MaxPooling2D((2, 2)))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dense(6, activation='softmax'))

I have checked that softmax is supported in the layers. I am using calibrator.so file on linux. Should I be using convert.py to work around?

@github-actions github-actions bot changed the title Quantization Layer Not supported: Softmax and constant Quantization Layer Not supported: Softmax and constant (AIV-702) Jul 25, 2024
@raprakashvi
Copy link
Author

@robinvanemden @kedars any thoughts?

@BlueSkyB
Copy link
Collaborator

For the constant operator, you can add 'extract_constant_to_initializer' in the onnxoptimizer.optimize() within the optimize_fp_model function. Refer to this commit for the modification: 020231e.

For the LogSoftmax operator, esp-dl does not currently support it; you can check your ONNX file again.

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

3 participants