-
Notifications
You must be signed in to change notification settings - Fork 48
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
BN error #350
Comments
Hello, The hardware does not support BatchNorm (BN) layer so if you want to use a BN layer in your model, you have to fuse these layers to the preceding convolution layers (see here). If you enable Quantization Aware Training (QAT) during your model training, the code automatically folds the the batchnorm layers. So if you use |
Hi
Thanks for reply
Yes,I have trained in both ways and I just have problem in none qat
So for your second choice in command how do I run my model in training
with batchnormfuser.py
Could you please tell me in details🙏🙏
…On Thu, 25 Jul 2024, 12:35 Erman Okman, ***@***.***> wrote:
Hello,
The hardware does not support BatchNorm (BN) layer so if you want to use a
BN layer in your model, you have to fuse these layers to the preceding
convolution layers (see here
<https://github.com/analogdevicesinc/ai8x-training?tab=readme-ov-file#batch-normalization>).
If you enable Quantization Aware Training (QAT) during your model training,
the code automatically folds the the batchnorm layers. So if you use
qat_checkpoint.pth.tar or qat_best.path.tar, you will not get such an
error during the code synthesis. If you want to use post training
quantization without QAT, you may run batchnormfuser.py to fold the BN
layers to the convolutional layers.
—
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWLZTJMP5HZEYDLOCBTZ2VTZOC5TZAVCNFSM6AAAAABLMOLD62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBZHAZTQNBRGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It is a python script that you can run from the command line. The details of the batchnormfuser is here. But we always suggest to use QAT as the direct quantization of a floating model may cause huge accuracy drop. |
Thanks a lot
I have another problem in command
In the documentation is suggested to use --energy for energy during
processing but in my max78000fthr board it doesn't show
How can I get energy ?
…On Thu, 25 Jul 2024, 13:46 Erman Okman, ***@***.***> wrote:
It is a python script that you can run from the command line. The details
of the batchnormfuser is here
<https://github.com/analogdevicesinc/ai8x-training?tab=readme-ov-file#command-line-arguments-1>.
But we always suggest to use QAT as the direct quantization of a floating
model may cause huge accuracy drop.
—
Reply to this email directly, view it on GitHub
<#350 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWLZTJJ4F5JSUTFC4S7KJWTZODGALAVCNFSM6AAAAABLMOLD62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBZHE3TSNBSGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You need a MAX78000 EvKit to measure and observe the energy consumption. The feather board does not have an energy measurement circuitry. |
thanks for reply |
There is no other straightforward approach to measure the energy consumption. |
This issue has been marked stale because it has been open for over 30 days with no activity. It will be closed automatically in 10 days unless a comment is added or the "Stale" label is removed. |
hi
when I want to generate c files I get this error "the checkpoint file contains 1-dimensional weights for
conv1.bn.weight
with dimensions (24,). Ensure the BatchNorm layers have been folded."what is the problem and what is the solution?
The text was updated successfully, but these errors were encountered: