Closed mrvacbob closed 4 years ago
import tensorflow.compat.v1 as tf
import tensorflow.compat.v1.keras.backend as K
This seems to help, I assume performance is worse in some way though.
If you're going to try to fix it, I'd recommend just starting fresh and trying to get a similar workflow going with gwerns Stylegan2 model (which has a built in embedding network). I've been meaning to, but I have exactly zero brain power left over after work recently.
edit: wait shit nvm wrong repo. This doesn't use stylegan. disregard this.
Using compat did fix it. The deepdanbooru project might have a gradcam tool built in though, so maybe this project is obsolete.
Alright, and yeah, if you can use the original authors repo, definitely do. This was a stopgap as at the time the original model existed only as a CNTK thing.
I came back to this and realized the notebooks don't run with tensorflow 2. Sad!