torch-dreams icon indicating copy to clipboard operation
torch-dreams copied to clipboard

add support for noisegrad

Open Mayukhdeb opened this issue 3 years ago • 2 comments

The paper can be found here: https://arxiv.org/pdf/2106.10185.pdf The core idea is to add noise to the weights on each iteration, in proportion to the weights variance in each layer.

It can be added in as an argument in the render() method:

image_param = dreamy_boi.render(
    layers = [model.Mixed_5b],
    use_noisegrad = True
)

Mayukhdeb avatar Jan 19 '22 11:01 Mayukhdeb

The process is formally described below :arrow_down: : Screenshot from 2022-01-22 11-49-06

Mayukhdeb avatar Jan 22 '22 06:01 Mayukhdeb

Fast Noisegrad: The idea is just to add multiplicative noise to the model weights on each optimisation iteration -- but each time to the original model weights. Thus not stacking up any noise.

Mayukhdeb avatar Jan 22 '22 06:01 Mayukhdeb