Comments (4)
Hi. For the test set, when data is encoded, the z_mean
is generated by the encoder.
For CVAE, this is expected to be almost evenly distributed within a circle (2d z_mean
). z_mean
changes depending on the input test data.
from advanced-deep-learning-with-keras.
encoder = Model([inputs, y_labels],
[z_mean, z_log_var, z],
name='encoder')
The output of the encoder is z_mean, z_log_var, z. I understand the z_mean is generated by the encoder, the problem I'm having is the values for z_mean are all the same for all the input test data. in CVAE. This is not the case when working with regular VAE.
from advanced-deep-learning-with-keras.
CVAE (and VAE) encoder z_mean
distribution has an objective function to approximate a Gaussian with zero mean and std=1. On the test set, this can be verified by inserting this code:
z, _, _ = encoder.predict([x_test, to_categorical(y_test)],
batch_size=batch_size)
print("shape:", z.shape)
print("mean:", np.mean(z, axis=0))
print("std:", np.std(z, axis=0))
return
Then, it prints (verifying it is not constant but a distribution):
shape: (10000, 2)
mean: [ 0.07939055 0.02497174]
std: [ 0.91762519 0.92036796]
from advanced-deep-learning-with-keras.
When I plot the 10000 values, it does not resemble a normal distribution. All 10000 values are the same. This is for CVAE model only, the VAE model does produce a latent vector z with a normal distribution.
from advanced-deep-learning-with-keras.
Related Issues (19)
- issue with tf version
- from lib import gan HOT 2
- The average precision and the average recall have the same result values HOT 1
- possibly unnecessary multiplication at the mask_offset function? HOT 1
- possible error at calculating the number of boxes HOT 2
- Invalid Argument Error HOT 2
- Error for dcgan-mnist-4.2.1.py HOT 2
- Error occurred when finalizing GeneratorDataset iterator | Trying to run image segmentation on custom dataset HOT 6
- ssd evaluate
- Warning for dcgan-mnist-4.2.1.py HOT 1
- SSD train HOT 4
- Project dependencies may have API risk issues HOT 1
- autoencoder-2dim-mnist-3.2.2.py: expected decoder_input to have shape (16,) but got array with shape (2,)
- In dqn-cartpole-9.6.1.py, line 115, where does "reward" variable come from? HOT 1
- WGAN fails. No lib/gan exists. HOT 2
- Why the last dimension of the tensor is size=4 HOT 1
- SSD Data Generator in Keras HOT 4
- Unable to locate 'dataset' mentioned in Chapter 11 or it is not there. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advanced-deep-learning-with-keras.