Warning
illia is under active development. The library is evolving rapidly to ensure stable support across all frameworks. Expect ongoing changes as we improve functionality and performance.
illia is a library for Bayesian Neural Networks that brings uncertainty quantification to deep learning, a capability that is critical in sectors such as telecommunications, medicine, and beyond. Designed with flexibility in mind, it integrates seamlessly with multiple backends and popular frameworks, enabling a single codebase to support multiple backends with minimal modifications.
For full documentation, please visit the site: https://ericssonresearch.github.io/illia/
- Multi-Backend Support: Works with PyTorch, TensorFlow, and JAX.
- Graph Neural Networks: Currently integrated with PyTorch Geometric, with planned support for DGL and/or Spektral in future releases.
- Developer Friendly: Intuitive API design and comprehensive documentation.
To show how easy it is to use illia, here’s a quick example to get started. In this case, we explicitly choose the backend PyTorch, the underlying framework, and define a convolutional layer:
import os
import torch
# Configure backend (PyTorch is default)
os.environ["ILLIA_BACKEND"] = "torch"
import illia
from illia.nn import Conv2d
# Create a Bayesian convolutional layer
conv_layer = Conv2d(
input_channels=1,
output_channels=1,
kernel_size=3,
)
# Define input tensor
input_tensor = torch.rand(1, 1, 4, 4)
# Define the number of iterations to apply the forward pass
num_passes = 10
outputs = [conv_layer(input_tensor) for _ in range(num_passes)]
# Stack outputs into a single tensor
outputs = torch.stack(outputs)
print(f"Output shape: {outputs.shape}")
print(f"Output std: {outputs.std()}")
print(f"Output var: {outputs.var()}")
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation:
- Read our contributing guide for development setup.
- Check open issues for ways to help.
- Submit bug reports using our issue templates.
illia is released under the MIT License. We hope you find it useful and inspiring for your projects!