Skip to content
A pytorch helper library for Mixed Precision Training, Initialization, Metrics and More Utilities to simplify training of deep learning models
Branch: master
Clone or download
Latest commit 518ea86 Jun 8, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Update Jun 8, 2019
torchfusion_utils bug fixes Jun 8, 2019
LICENSE Initial commit May 2, 2019 Update Jun 8, 2019 bug fixes Jun 8, 2019


A pytorch helper library for Mixed Precision Training, Metrics and More Utilities to simplify training of deep learning models.

TorchFusion Utils was built to enable pytorch programmers easily take advantage of advanced training techniques without having to use any specific trainer framework. It is very transparent and can be easily plugged in to existing Pytorch code bases


TorchFusion Utils is extremely light with no other dependency other than Pytorch itself. You can install from pypi

 pip3 install torchfusion-utils --upgrade 

Core Features

Mixed Precision Training

In just two lines of code, you can speed up training of your Pytorch models, reduce memory usage on any GPU and fit in larger batch sizes than was previously possible on your GPU.

#convert your model and optimizer to mixed precision mode
model, optim = convertToFP16(model,optim)

#in your batch loop, replace loss.backward with optim.backward(loss)


A very simple api to easily initialize your model parameters with fine grained control over the type of layers and type of weights to be initialized.



An extensible metric package that makes it easy to easily compute accuracy of your models. A number of metrics are provided out of the box and you can extend to add yours.

top5_acc = Accuracy(topk=5)

#sample evaluation loop
for i,(x,y) in enumerate(data_loader):
    predictions = model(x)

print("Top 5 Acc: ",top5_accc.getValue())

Model Utilities

Simple functions to easily analyse, load and save your Pytorch models in an error free way.


Find tutorials and extensive documentation on using TorchFusion Utils from

About The TorchFusion Project

The TorchFusion project is a set of Pytorch based deep learning libraries aimed at making making research easier and more productive. We believe anyone can be a great researcher with the right tools, thats why we build!

TorchFusion is an initiative of DeepQuest AI, founded by John Olafenwa & Moses Olafenwa.

Contact Developers

John Olafenwa
Twitter: @johnolafenwa
Medium : @johnolafenwa
Facebook : olafenwajohn

Moses Olafenwa
Twitter: @OlafenwaMoses
Medium : @guymodscientist
Facebook : moses.olafenwa

You can’t perform that action at this time.