You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 1.2 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
  2. #
  3. # Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
  4. #
  5. # Unless required by applicable law or agreed to in writing,
  6. # software distributed under the License is distributed on an
  7. # "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  8. from .fake_quant import TQT, FakeQuantize
  9. from .observer import (
  10. ExponentialMovingAverageObserver,
  11. HistogramObserver,
  12. MinMaxObserver,
  13. Observer,
  14. PassiveObserver,
  15. SyncExponentialMovingAverageObserver,
  16. SyncMinMaxObserver,
  17. )
  18. from .qconfig import (
  19. QConfig,
  20. calibration_qconfig,
  21. easyquant_qconfig,
  22. ema_fakequant_qconfig,
  23. ema_lowbit_fakequant_qconfig,
  24. min_max_fakequant_qconfig,
  25. passive_qconfig,
  26. sync_ema_fakequant_qconfig,
  27. tqt_qconfig,
  28. )
  29. from .quantize import (
  30. apply_easy_quant,
  31. disable_fake_quant,
  32. disable_observer,
  33. enable_fake_quant,
  34. enable_observer,
  35. propagate_qconfig,
  36. quantize,
  37. quantize_qat,
  38. reset_qconfig,
  39. )
  40. from .utils import (
  41. QParams,
  42. QuantMode,
  43. create_qparams,
  44. fake_quant_bias,
  45. fake_quant_tensor,
  46. )

MegEngine 安装包中集成了使用 GPU 运行代码所需的 CUDA 环境,不用区分 CPU 和 GPU 版。 如果想要运行 GPU 程序,请确保机器本身配有 GPU 硬件设备并安装好驱动。 如果你想体验在云端 GPU 算力平台进行深度学习开发的感觉,欢迎访问 MegStudio 平台