Path: blob/master/Autoencoder-in-TensorFlow/AE_Cartoon_TensorFlow.ipynb
3119 views
Kernel: Tuts
In [1]:
In [13]:
In [14]:
In [17]:
Out[17]:
Found 100000 files belonging to 10 classes.
In [4]:
Out[4]:
In [18]:
In [19]:
In [20]:
Out[20]:
0.0 1.0
In [21]:
In [22]:
In [23]:
In [24]:
In [25]:
Out[25]:
Model: "Encoder"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_layer (InputLayer) [(None, 256, 256, 3)] 0
_________________________________________________________________
conv_1 (Conv2D) (None, 128, 128, 32) 896
_________________________________________________________________
bn_1 (BatchNormalization) (None, 128, 128, 32) 128
_________________________________________________________________
lrelu_1 (LeakyReLU) (None, 128, 128, 32) 0
_________________________________________________________________
conv_2 (Conv2D) (None, 64, 64, 64) 18496
_________________________________________________________________
bn_2 (BatchNormalization) (None, 64, 64, 64) 256
_________________________________________________________________
lrelu_2 (LeakyReLU) (None, 64, 64, 64) 0
_________________________________________________________________
conv_3 (Conv2D) (None, 32, 32, 64) 36928
_________________________________________________________________
bn_3 (BatchNormalization) (None, 32, 32, 64) 256
_________________________________________________________________
lrelu_3 (LeakyReLU) (None, 32, 32, 64) 0
_________________________________________________________________
conv_4 (Conv2D) (None, 16, 16, 64) 36928
_________________________________________________________________
bn_4 (BatchNormalization) (None, 16, 16, 64) 256
_________________________________________________________________
lrelu_4 (LeakyReLU) (None, 16, 16, 64) 0
_________________________________________________________________
conv_5 (Conv2D) (None, 8, 8, 64) 36928
_________________________________________________________________
bn_5 (BatchNormalization) (None, 8, 8, 64) 256
_________________________________________________________________
lrelu_5 (LeakyReLU) (None, 8, 8, 64) 0
_________________________________________________________________
flatten (Flatten) (None, 4096) 0
_________________________________________________________________
dense_1 (Dense) (None, 200) 819400
=================================================================
Total params: 950,728
Trainable params: 950,152
Non-trainable params: 576
_________________________________________________________________
In [26]:
In [27]:
In [28]:
Out[28]:
Model: "Decoder"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_layer (InputLayer) [(None, 200)] 0
_________________________________________________________________
dense_1 (Dense) (None, 4096) 823296
_________________________________________________________________
Reshape_Layer (Reshape) (None, 8, 8, 64) 0
_________________________________________________________________
conv_transpose_1 (Conv2DTran (None, 16, 16, 64) 36928
_________________________________________________________________
bn_1 (BatchNormalization) (None, 16, 16, 64) 256
_________________________________________________________________
lrelu_1 (LeakyReLU) (None, 16, 16, 64) 0
_________________________________________________________________
conv_transpose_2 (Conv2DTran (None, 32, 32, 64) 36928
_________________________________________________________________
bn_2 (BatchNormalization) (None, 32, 32, 64) 256
_________________________________________________________________
lrelu_2 (LeakyReLU) (None, 32, 32, 64) 0
_________________________________________________________________
conv_transpose_3 (Conv2DTran (None, 64, 64, 64) 36928
_________________________________________________________________
bn_3 (BatchNormalization) (None, 64, 64, 64) 256
_________________________________________________________________
lrelu_3 (LeakyReLU) (None, 64, 64, 64) 0
_________________________________________________________________
conv_transpose_4 (Conv2DTran (None, 128, 128, 32) 18464
_________________________________________________________________
bn_4 (BatchNormalization) (None, 128, 128, 32) 128
_________________________________________________________________
lrelu_4 (LeakyReLU) (None, 128, 128, 32) 0
_________________________________________________________________
conv_transpose_5 (Conv2DTran (None, 256, 256, 3) 867
=================================================================
Total params: 954,307
Trainable params: 953,859
Non-trainable params: 448
_________________________________________________________________
In [16]:
In [18]:
In [18]:
In [19]:
In [20]:
In [21]:
In [22]:
In [23]:
In [ ]:
In [30]:
In [31]:
In [23]:
In [20]:
Out[20]:
(128, 200)
In [24]:
Out[24]:
In [18]:
In [22]:
Out[22]:
(5120, 256, 256, 3)
In [24]:
Out[24]:
Reconstructing Cartoon Images with Latent-Vector Sampled Uniformly
In [46]:
Out[46]:
(10, 200)
Reconstructing Cartoon Images from a Latent-Vector Sampled with Normal Distribution
In [32]:
Out[32]:
In [ ]: