Skip to main content

A package for analyzing model parameters

Project description

Model Parameters Analyzer

This is a Python package that helps you analyze the parameters of your models. It calculates the number of parameters in the model and their percentages than generate analyze JSON file and charts for you.

中文介绍

这是一个可帮助您分析模型参数的Python包。它计算模型中的参数数量及其百分比,然后为您生成分析 JSON 文件和图表。
快速安装: pip install mpanalyze
简单使用: import mpanalyze mpanalyze.params_analyze(${model})
详细参数参考 Usage

Porject Displays

tree treemap

Installation

To install this package, you can use pip:

pip install mpanalyze

Usage

You can use this package from the command line with the follow command:

import mpanalyze
mpanalyze.params_analyze(${model})
  • More parameters for params_analyze
    model: object | The model to analyze.
    name: str(Optional) | The name of the model. It will add to the analyze dir begin. If not specified, the directory name will be 'params_analyze'.
    port: int(Opetional) | The port to use for the HTTP server. If not specified, the browser will not be opened. Recommended only use in Debug mode. If you want to use in training, it will block the training process.
    save_dict: bool(Optional) | Whether to save the parameters to a JSON file. Default is True. tree: bool(Optional) | Whether to draw a tree chart. Default is True.
    treemap: bool(Optional) | Whether to draw a TreeMap chart. Default is True.

Only get analyze aict:

param_dict = calculate_dict(model)

This will calculate the parameters and their percentages for your model.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpanalyze-0.3.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpanalyze-0.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file mpanalyze-0.3.tar.gz.

File metadata

  • Download URL: mpanalyze-0.3.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for mpanalyze-0.3.tar.gz
Algorithm Hash digest
SHA256 4146ca8e7efee7c0a3ecd41c0e27f8a5370228ecef44b64e2f7a3f4c3d27894f
MD5 04fa8b2436e4fa7e2ad6855aec974902
BLAKE2b-256 7609945c0fe69a47f4e95c1cf55a6fa4b49a84b32d9bb4e4f6d99b35399afef3

See more details on using hashes here.

File details

Details for the file mpanalyze-0.3-py3-none-any.whl.

File metadata

  • Download URL: mpanalyze-0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.14

File hashes

Hashes for mpanalyze-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6f1514aa428f9c4525093a54faf74a75ff086eb6c09e4a06c46c183de4a52cdd
MD5 ca2a58ada78d8f58a8c14f8347c570b0
BLAKE2b-256 f96da2b344c8bd9b44e154ab81261077f3fafcd1660966071fe82535607c3d5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page