How ntuaislab/bronet works
Project type and purpose
• This is a PyTorch‐based research codebase (“BRONet”) for training and evaluating Lipschitz‐constrained neural networks using two key innovations:
• Block Reflector Orthogonal Layers (BRO)
• Logit Annealing Loss (LA)
• It actually contains two sibling implementations:
• bronet/ – the “main” BRONet experiments, configs, training & test scripts
• lipconvnet/ – a standalone LipConvNet implementation with its own model, trainer, utils
File structure
Top level
• requirements.txt, README.md, LICENSE, THIRD_PARTY_LICENSES.md
bronet/
• configs/benchmark_reproduce/*.yaml – dataset & hyperparameter definitions
• models/ – model definition split into backbone, layers, margin_layer, head, neck, etc.
• tools/ – data pipelines (dataloader, cifar/imagenet parsers), scheduler, env setup
• train.py, test.py, run.sh, test.sh – CLI entry points for training & evaluation
• edm2_gen_script/ – scripts to generate synthetic images for the “EDM2” setting
lipconvnet/
• main.py, run.sh – CLI entry point for training & testing LipConvNet
• models/ – layers implementations (BRO, SOC, LOT, custom linear, etc.)
• trainer/ – Trainer, Evaluator, Base classes orchestrating forward/backward loops
• utils/ – custom activations, loss functions, scheduler wrappers, data utils, misc
Insights from README
• The project depends on Python 3.11 and PyTorch ≥ 2.0 with CUDA
• High‐level pipeline: load a config → initialize data loaders → build model → train with LA loss and orthogonal layers → evaluate/certify → save checkpoints
• Pretrained weights live on HuggingFace; test flags and distributed launch demonstrated