precision_cnt.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. /* ----------------------------------------------------------------------
  2. * Project: TinyEngine
  3. * Title: precision_cnt.h
  4. *
  5. * Reference papers:
  6. * - MCUNet: Tiny Deep Learning on IoT Device, NeurIPS 2020
  7. * - MCUNetV2: Memory-Efficient Patch-based Inference for Tiny Deep Learning, NeurIPS 2021
  8. * - MCUNetV3: On-Device Training Under 256KB Memory, NeurIPS 2022
  9. * Contact authors:
  10. * - Wei-Ming Chen, wmchen@mit.edu
  11. * - Wei-Chen Wang, wweichen@mit.edu
  12. * - Ji Lin, jilin@mit.edu
  13. * - Ligeng Zhu, ligeng@mit.edu
  14. * - Song Han, songhan@mit.edu
  15. *
  16. * Target ISA: ARMv7E-M
  17. * -------------------------------------------------------------------- */
  18. #ifndef TINYENGINE_SOURCE_CONVOLUTIONFUNCTIONS_MIX_PRECISION_CNT_H_
  19. #define TINYENGINE_SOURCE_CONVOLUTIONFUNCTIONS_MIX_PRECISION_CNT_H_
  20. /* MIX precision */
  21. #define INPUT_PRE 8
  22. #define KERNEL_PRE 8
  23. #define OUTPUT_PRE 8
  24. #define input_scaler (8 / INPUT_PRE)
  25. #define weight_scaler (8 / KERNEL_PRE)
  26. #define output_scaler (8 / OUTPUT_PRE)
  27. #endif /* TINYENGINE_SOURCE_CONVOLUTIONFUNCTIONS_MIX_PRECISION_CNT_H_ */