Code Monkey home page Code Monkey logo

hamq's Introduction

HamQ-ResNet-CIFAR10

Welcome to the HamQ-ResNet-CIFAR10 repository! This project is based on the paper "HamQ: Hamming Weight-based Energy Aware Quantization for Analog Compute-In-Memory Accelerator in Intelligent Sensors" Link, which introduces a novel regularizer, HamQ, to enhance the energy efficiency of analog Compute-In-Memory (CIM) accelerators used in machine learning tasks. Our codebase includes a complete setup for training a ResNet model on the CIFAR-10 dataset using the proposed regularizer.

Citation

If you find our work useful in your research, please consider citing:

@article{sharma2024hamq,
  title={HamQ: Hamming Weight-based Energy Aware Quantization for Analog Compute-In-Memory Accelerator in Intelligent Sensors},
  author={Sharma, Sudarshan and Kang, Beomseok and Kidambi, Narasimha Vasishta and Mukhopadhyay, Saibal},
  journal={IEEE Sensors Journal},
  year={2024},
  publisher={IEEE}
}

Project Overview

HamQ (Hamming weight-based Quantization) is a technique developed to reduce the energy consumption of analog CIM accelerators by implementing a regularizer that minimizes the Hamming weight of quantized model weights. This repository contains Python scripts to train a ResNet model on the CIFAR-10 dataset, demonstrating how HamQ can be integrated into a deep learning training pipeline.

Files in this Repository

  • train.py: The main script to start the training/evaluation process.
  • net.py: Defines the ResNet architecture modified to include HamQ.
  • utils.py: Helper functions for training and data processing.
  • utils_en.py: Additional utilities for energy calculations and logging.
  • map.py: Handles the mapping of simulated bitline energy to actual energy.

Getting Started

Prerequisites

Ensure you have Python 3.8+ and PyTorch installed. You can install all dependencies via:

pip install -r requirements.txt

hamq's People

Stargazers

 avatar Beomseok Kang avatar

Watchers

Sudarshan Sharma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.