Я попробовал ваш код в Google Colab. Следующее генерируется. Я думаю, что это не проблема кода. Вы можете проверить другую проблему, например, установка.
Using TensorFlow backend.
2.2.4
build generator model
WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
Tensor("reshape_1/Reshape:0", shape=(?, 7, 7, 128), dtype=float32)
built first part
finised building
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
gen_input (InputLayer) (None, 100) 0
_________________________________________________________________
dense_1 (Dense) (None, 6272) 633472
_________________________________________________________________
reshape_1 (Reshape) (None, 7, 7, 128) 0
_________________________________________________________________
batch_normalization_1 (Batch (None, 7, 7, 128) 512
_________________________________________________________________
activation_1 (Activation) (None, 7, 7, 128) 0
_________________________________________________________________
conv2d_transpose_1 (Conv2DTr (None, 14, 14, 128) 409728
_________________________________________________________________
batch_normalization_2 (Batch (None, 14, 14, 128) 512
_________________________________________________________________
activation_2 (Activation) (None, 14, 14, 128) 0
_________________________________________________________________
conv2d_transpose_2 (Conv2DTr (None, 28, 28, 64) 204864
_________________________________________________________________
batch_normalization_3 (Batch (None, 28, 28, 64) 256
_________________________________________________________________
activation_3 (Activation) (None, 28, 28, 64) 0
_________________________________________________________________
conv2d_transpose_3 (Conv2DTr (None, 28, 28, 32) 51232
_________________________________________________________________
batch_normalization_4 (Batch (None, 28, 28, 32) 128
_________________________________________________________________
activation_4 (Activation) (None, 28, 28, 32) 0
_________________________________________________________________
conv2d_transpose_4 (Conv2DTr (None, 28, 28, 1) 801
_________________________________________________________________
activation_5 (Activation) (None, 28, 28, 1) 0
=================================================================
Total params: 1,301,505
Trainable params: 1,300,801
Non-trainable params: 704
_________________________________________________________________
None