blaisedelattre / lip4conv

Code for Spectral Norm of Convolutional Layers with Circular and Zero Paddings and Efficient Bound of Lipschitz Constant for Convolutional Layers by Gram Iteration

Home Page:https://arxiv.org/abs/2402.00240

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spectral Norms and Lipschitz Bounds for Convolutional Layers

This repository contains the code for the following articles:

Gram iteration is a deterministic method to compute spectral norm in quadratic convergence. It exhibits SOTA results on GPU regarding spectral norm computations.

This repository

Outline

  • bounds.py contains code for different spectral norm bounds.

  • note_book_test_gram_iteration.ipynb contains some examples of spectral norm bound computations for different methods on dense and convolutional layers.

  • train_local.py contains code to launch a training. Start a default configuration run python train_local.py --bound delattre2023 --bound_n_iter 6 --lr 0.1 --r 0.1

Installation

Experiences were done using pytorch-cuda=11.7

git clone https://github.com/blaisedelattre/lip4conv.git

About

Code for Spectral Norm of Convolutional Layers with Circular and Zero Paddings and Efficient Bound of Lipschitz Constant for Convolutional Layers by Gram Iteration

https://arxiv.org/abs/2402.00240

License:MIT License


Languages

Language:Python 73.4%Language:Jupyter Notebook 26.6%