tensorflow / lucid

A collection of infrastructure and tools for research in neural network interpretability.
Apache License 2.0
4.64k stars 652 forks source link

Fixed seed issue in Style Transfer notebook #278

Closed glennamarshall closed 3 years ago

glennamarshall commented 3 years ago

Does anyone know how to get 'fixed seed' working in this notebook, https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/differentiable-parameterizations/style_transfer_2d.ipynb

according to the notes in render.py

use_fixed_seed: Seed the RNG with a fixed value so results are reproducible. Off by default. As of tf 1.8 this does not work as intended, see: https://github.com/tensorflow/tensorflow/issues/9171

the notebook uses tf 1.15 - so it should work?

I'm trying to create animation - but want every frame to have the same 'seed'. Thanks.

400lbhacker commented 3 years ago

the colab ipynb does not require any exogenous .py's, if you want to manually edit that its simple just set var = fixxed value and than go for every seed constant and replace it. theirs over 20 occourances in that file, how your going to make that into a workable google colab is gonna be the hard part... much simper way that can be done within google colab ipynb is to mess around with the matrix grid and activation paremeters. their is a high degree of entropy still compared to other style transfer sources but it makes multiple frames look much nicer, its a feature not a bug

https://media.giphy.com/media/7miuew7AV8ksUoP0zf/giphy.gif

glennamarshall commented 3 years ago

the colab ipynb does not require any exogenous .py's, if you want to manually edit that its simple just set var = fixxed value and than go for every seed constant and replace it. theirs over 20 occourances in that file, how your going to make that into a workable google colab is gonna be the hard part... much simper way that can be done within google colab ipynb is to mess around with the matrix grid and activation paremeters. their is a high degree of entropy still compared to other style transfer sources but it makes multiple frames look much nicer, its a feature not a bug

https://media.giphy.com/media/7miuew7AV8ksUoP0zf/giphy.gif

Hey - thanks very much for the helpful reply - it did indeed try to go through the code and fix every randomisation I could see - but was a nightmare - I've since found other ways / repos to get what I want.