Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Deep Learning
  3. Torchnet - Torch based Deep Learning Library

Torchnet - Torch based Deep Learning Library

NOASSERTIONLua

A modular framework for Torch providing abstractions for datasets, engines, meters, and logs to encourage code re-use.

GitHubGitHub
988 stars184 forks0 contributors

What is Torchnet - Torch based Deep Learning Library?

Torchnet is a modular framework for the Torch machine learning library that provides abstractions for datasets, training engines, performance meters, and logging. It solves the problem of repetitive boilerplate code in ML experiments by offering reusable components that handle data processing, model training loops, and evaluation metrics in a structured way.

Target Audience

Machine learning researchers and developers using Torch who want to build experiments with reusable, modular components and avoid rewriting common training and evaluation code.

Value Proposition

Developers choose Torchnet because it reduces code duplication, enforces clean separation of concerns, and provides a standardized way to handle datasets, training loops, and metrics, making experiments more reproducible and easier to maintain.

Overview

Torch on steroids

Use Cases

Best For

  • Building modular training pipelines in Torch
  • Experimenting with different dataset sampling and batching strategies
  • Tracking and logging multiple performance metrics during model training
  • Implementing custom training hooks without rewriting the entire loop
  • Comparing models using standardized evaluation meters
  • Managing complex data preprocessing with composable transformations

Not Ideal For

  • Projects targeting production deployment with high-performance, real-time inference requirements
  • Teams already invested in Python-based frameworks like PyTorch or TensorFlow who prefer native integrations
  • Beginners seeking out-of-the-box solutions with extensive documentation and community support
  • Applications needing the latest deep learning features and pre-trained models from a vibrant ecosystem

Pros & Cons

Pros

Modular Dataset Abstractions

Provides a unified interface for data handling through classes like tnt.Dataset, enabling easy batching, shuffling, concatenation, and on-the-fly transformations without boilerplate code.

Flexible Training Engines

Engines such as SGDEngine and OptimEngine offer hooks for custom logic during events like forward/backward passes, allowing seamless experimentation with training loops.

Comprehensive Performance Meters

Includes meters for metrics like accuracy, precision, recall, AUC, and confusion matrices, facilitating detailed model evaluation without manual implementation.

Structured Logging System

The Log class with viewers outputs experiment data to files or console in formats like text or JSON, enhancing reproducibility and tracking.

Cons

Outdated Technology Stack

Built on Torch (Lua), which has been largely superseded by PyTorch, resulting in limited community support, fewer updates, and compatibility issues with modern tools.

Steep Learning Curve

Requires proficiency in Lua and Torch, and the modular abstractions involve understanding multiple components (e.g., datasets, engines, meters) before effective use.

Sparse Practical Examples

Beyond the basic MNIST example, comprehensive tutorials or real-world use cases are lacking, making it challenging to apply to complex, custom projects.

Performance Overhead

The abstraction layers for modularity may introduce latency in data loading and transformation compared to hand-optimized code, especially for large-scale datasets.

Frequently Asked Questions

Quick Stats

Stars988
Forks184
Contributors0
Open Issues2
Last commit7 years ago
CreatedSince 2016

Tags

#deep-learning#modular-design#logging#training-loop#lua#dataset#torch#machine-learning#metrics

Built With

T
Torch
L
LuaRocks
L
Lua

Included in

Machine Learning72.2kDeep Learning27.8kDeep Vision11.2k
Auto-fetched 9 hours ago

Related Projects

Tensorflow - Open source software library for numerical computation using data flow graphsTensorflow - Open source software library for numerical computation using data flow graphs

An Open Source Machine Learning Framework for Everyone

Stars194,975
Forks75,330
Last commit7 hours ago
PyTorch - Tensors and Dynamic neural networks in Python with strong GPU accelerationPyTorch - Tensors and Dynamic neural networks in Python with strong GPU acceleration

Tensors and Dynamic neural networks in Python with strong GPU acceleration

Stars99,591
Forks27,643
Last commit7 hours ago
keraskeras

Deep Learning for humans

Stars64,059
Forks19,760
Last commit1 day ago
streamlitstreamlit

Streamlit — A faster way to build and share data apps.

Stars44,427
Forks4,221
Last commit19 hours ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub