Torchfusion-utils

Latest version: v0.1.5

Safety actively analyzes 625082 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.1.5

Alpha release of TorchFusion Utils

Whats New!

- Mixed Precision Training
Train your pytorch models faster with reduced memory usage. With few lines of code, you can take advantage of nvidia tensor cores for accelerated training of deep learning models.

Example
<pre>
from torchfusion_utils.fp16 import convertToFP16

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)
optim.backward(loss)

</pre>

- Initializers
Easy initialize your model with state-of-the-art initializers with fine grained control over layers and parameters.

Example

<pre>
from torchfusion_utils.initializers import *

initialize the convolution layers with kaiming_normal
kaiming_normal_init(model,types=[nn.Conv2d])

initialize the linear layers with normal
normal_init(model,types=[nn.Linear])

initialize batchnorm weights with ones
ones_init(model,types=[nn.BatchNorm2d],category="weight")

initialize batchnorm bias with zeros
zeros_init(model,types=[nn.BatchNorm2d],category="bias")
</pre>

- Metrics
Support for popular metrics and simple api to create your custom metrics

- Model Utils
Functions to reliably load and save models and summary function for analyzing the parameters, computational cost and structure of deep learning models

Documentation

Comprehensive documentation from [utils.torchfusion.org](https://utils.torchfusion.org)

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.