From 2fa33bcc6bdcb497f763e1b88790c6500b825f79 Mon Sep 17 00:00:00 2001 From: Wenyu Date: Wed, 24 Nov 2021 19:05:52 +0800 Subject: [PATCH] model params FAQ (#4693) --- configs/picodet/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configs/picodet/README.md b/configs/picodet/README.md index dc6d0dc75..6a41d4847 100644 --- a/configs/picodet/README.md +++ b/configs/picodet/README.md @@ -309,6 +309,21 @@ Please use `PicoDet-LCNet` model, which has fewer `transpose` operators. +
+How to count model parameters. + +You can insert below code at [here](https://github.com/PaddlePaddle/PaddleDetection/blob/develop/ppdet/engine/trainer.py#L141) to count learnable parameters. + +```python +params = sum([ + p.numel() for n, p in self.model. named_parameters() + if all([x not in n for x in ['_mean', '_variance']]) +]) # exclude BatchNorm running status +print('params: ', params) +``` + +
+ ## Cite PP-PicoDet If you use PicoDet in your research, please cite our work by using the following BibTeX entry: ``` -- GitLab