Source author record

Jonas Rauber

Explore this author’s publications, collaborators and research topics. This catalog record has not been claimed by its author.

ResearcherUnclaimed source record

Catalog footprint

Research overview

2works
2topics
2close collaborators

Published work

2 publications

preprint2020arXiv

EagerPy: Writing Code That Works Natively with PyTorch, TensorFlow, JAX, and NumPy

EagerPy is a Python framework that lets you write code that automatically works natively with PyTorch, TensorFlow, JAX, and NumPy. Library developers no longer need to choose between supporting just one of these frameworks or reimplementing the library for each framework and dealing with code duplication. Users of such libraries can more easily switch frameworks without being locked in by a specific 3rd party library. Beyond multi-framework support, EagerPy also brings comprehensive type annotations and consistent support for method chaining to any framework. The latest documentation is available online at https://eagerpy.jonasrauber.de and the code can be found on GitHub at https://github.com/jonasrauber/eagerpy.

preprint2020arXiv

Fast Differentiable Clipping-Aware Normalization and Rescaling

Rescaling a vector δ⃗∈Rn\vecδ \in \mathbb{R}^n to a desired length is a common operation in many areas such as data science and machine learning. When the rescaled perturbation ηδ⃗η\vecδ is added to a starting point x⃗∈D\vec{x} \in D (where DD is the data domain, e.g. D=[0,1]nD = [0, 1]^n), the resulting vector v⃗=x⃗+ηδ⃗\vec{v} = \vec{x} + η\vecδ will in general not be in DD. To enforce that the perturbed vector vv is in DD, the values of v⃗\vec{v} can be clipped to DD. This subsequent element-wise clipping to the data domain does however reduce the effective perturbation size and thus interferes with the rescaling of δ⃗\vecδ. The optimal rescaling ηη to obtain a perturbation with the desired norm after the clipping can be iteratively approximated using a binary search. However, such an iterative approach is slow and non-differentiable. Here we show that the optimal rescaling can be found analytically using a fast and differentiable algorithm. Our algorithm works for any p-norm and can be used to train neural networks on inputs with normalized perturbations. We provide native implementations for PyTorch, TensorFlow, JAX, and NumPy based on EagerPy.

Research graph

See the researcher in context

Open full explorer

Inspect adjacent papers, topics, institutions and collaborators without losing the researcher page.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.