davidADSP / GDL_code

The official code repository for examples in the O'Reilly book 'Generative Deep Learning'

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discrepancy between trainable weights and collected trainable weights

danvk opened this issue · comments

When I run the 04_03_wgangp_faces_train notebook, I get this error:

/home/danvk/GDL_code/venv/lib/python3.7/site-packages/keras/engine/training.py:297: UserWarning: Discrepancy between trainable weights and collected trainable weights, did you set `model.trainable` without calling `model.compile` after ?
  'Discrepancy between trainable weights and collected trainable'
/home/danvk/GDL_code/venv/lib/python3.7/site-packages/keras/engine/training.py:297: UserWarning: Discrepancy between trainable weights and collected trainable weights, did you set `model.trainable` without calling `model.compile` after ?
  'Discrepancy between trainable weights and collected trainable'

Here's what the full cell looks like:

image

The model seems to progress while training:

image

Unfortunately, it doesn't seem to checkpoint any of the weights or save sample images. Even trying to save images explicitly does nothing:

gan.sample_images(RUN_FOLDER)
# RUN_FOLDER is empty

I did have to update to tensorflow 2 to get it to recognize my GPU, so perhaps that's the culprit.

Nevermind, I got confused about which machine I was looking for the files on. Everything works great despite the warnings. Sorry for the noise!