{"categories":[{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/6"}],"enrichment":{"capability":"Computes exponential moving averages of PyTorch model parameters during training, allowing you to evaluate models using smoothed weights without modifying the original training state.","skillfed_tags":["pytorch-training","model-regularization"],"use_cases":["Evaluate a model on validation data using EMA-smoothed weights to measure generalization improvement without retraining","Apply EMA during training to reduce overfitting by using averaged parameters at inference time while keeping original weights for continued optimization","Transfer EMA weights to a second model for deployment or ensemble methods using the `copy_to()` method","Checkpoint and resume training with EMA state preserved via `state_dict()` and `load_state_dict()`","Experiment with different decay rates to tune the balance between tracking recent updates and long-term stability"],"what_it_does":"torch-ema is a small PyTorch utility that maintains exponential moving averages of model parameters during training. It wraps your model's parameters and tracks a smoothed version of their values using a configurable decay rate, typically 0.995 or higher. The main use is to evaluate your model using these averaged weights\u2014often producing better generalization\u2014without disrupting the original training loop or optimizer state.\n\nThe library provides a context manager (`average_parameters()`) that temporarily swaps your model's weights with their EMA counterparts for validation, then restores the originals. It also supports manual store/copy/restore operations, device movement (GPU/CPU), and serialization via `state_dict()` for resuming training. Its only runtime dependency is torch, making installation straightforward.","worth_installing":"Yes, with conditions. Install if you need EMA for PyTorch model training and can verify the license from the GitHub repository. The package is lightweight, has no security vulnerabilities, and low install friction. However, maintenance is dormant (last release 2021-11-17); test compatibility with your PyTorch version before production use, and monitor the repository for any breaking changes in newer PyTorch releases."},"id":"torch-ema","links":{"html":"https://skillfed.io/packages/torch-ema","md":"https://skillfed.io/packages/torch-ema.md","pypi":"https://pypi.org/project/torch-ema/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2021-11-17","license_spdx":null,"license_treatment":"unclear","name":"torch-ema","python_support":"unspecified","summary":"PyTorch library for computing moving averages of model parameters."},"popularity":{"monthly_downloads":308278,"position":7766,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.3"}
