Skip to content

Sapana-Micro-Software/ddaf

Repository files navigation

DDAF: Data-Driven, Dynamic, Online, and Attention-Based Activation Functions

Copyright (C) 2025, Shyamal Suhana Chandra

Overview

DDAF is a comprehensive C/C++ library implementing adaptive activation functions for deep neural networks. It supports four types of activation functions:

  • Data-Driven: Adapts based on input data statistics
  • Dynamic: Parameters evolve over time during training
  • Online: Real-time adaptation to streaming data
  • Attention-Based: Uses attention mechanisms to weight activations

Supported Architectures

  • Convolutional Neural Networks (CNNs)
  • Recurrent Neural Networks (RNNs)
  • Long Short-Term Memory (LSTMs)
  • Gated Recurrent Units (GRUs)
  • Transformers
  • Hierarchical Transformers
  • Big Bird
  • Mixture of Experts (MoE)

Building

Requirements

  • CMake 3.12 or higher
  • C11 compatible compiler
  • C++17 compatible compiler

Build Instructions

mkdir build
cd build
cmake ..
make

This will create:

  • Static library: libddaf_static.a
  • Shared library: libddaf_shared.so (or .dylib on macOS)
  • Example executables in examples/

Usage

Include the header file:

#include "ddaf.h"

Basic example:

// Create context
ddaf_context_t* ctx = ddaf_create_context(
    DDAF_TYPE_DATA_DRIVEN, 
    DDAF_ARCH_CNN, 
    0
);

// Initialize
ddaf_cnn_init(ctx, 64, 32, 32);

// Forward pass
ddaf_forward(ctx, input, output, size);

// Backward pass
ddaf_backward(ctx, grad_output, grad_input, size);

// Cleanup
ddaf_destroy_context(ctx);

See examples/ directory for more complete examples.

Documentation

See docs/ directory for:

  • paper.tex: Research paper
  • presentation.tex: Beamer presentation
  • reference_manual.tex: Complete API reference

GitHub Pages

🌐 Live Website: View on GitHub Pages

GitHub Pages

The website is automatically deployed using GitHub Actions. See GITHUB_PAGES_SETUP.md for setup instructions.

Quick Setup

  1. Enable GitHub Pages in repository settings (Source: GitHub Actions)
  2. Push to main branch - deployment happens automatically
  3. Site will be live at https://Sapana-Micro-Software.github.io/ddaf/

License

Copyright (C) 2025, Shyamal Suhana Chandra

All rights reserved.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published