Data structures and libraries for Torch. All instances are Torch serializable with
You can install
torchlib as follows:
git clone https://github.com/vzhong/torchlib.git && cd torchlib && luarocks make
Torchlib is namespaced locally. To use it:
local tl = require 'torchlib' local m = tl.DirectedGraph() ...
Examples and use cases are shown in the documentation.
Torchlib's can be divided into categories based on usecases.
Basic Datastructures and Algorithms
- Lists, heaps, queues and stacks
- Maps and counters
The machine learning package contains utilities that facilitate the training of and evaluation of machine learning models. These include:
- Dataset, which provides mechanisms for subsampling, shuffling, batching of arbitrary examples.
- Vocab, for mapping between indices and words.
- Model, an abstract class to facilitate the training of Torch based machine learning models.
- Scorer, for evaluating precision/recall metrics.
- ProbTable, for modeling probability distributions.
- Experiment, for logging experiment progress to a postgres instance.
- Downloader, for downloading content via http.
- Global, global convenience functions namespaced under
- String, string convenience functions namespaced under
tl.stringand monkeypatched into
- Table, table convenience functions namespaced under
tl.tableand monkeypatched into
Pull requests are welcome! Torchlib is unit tested with the default Torch testing framework. Continuous integration is hosted on Wercker which also automatically builds the documentations and deploys them on Github pages (of this repo).