Commit 77d77a1d authored by lucas_miranda's avatar lucas_miranda
Browse files

Prototyped KNN_purity callback

parent 8ddff252
......@@ -208,8 +208,8 @@ class knn_cluster_purity(tf.keras.callbacks.Callback):
""" Passes samples through the encoder and computes cluster purity on the latent embedding """
# Get encoer and grouper from full model
encoder =
grouper =
encoder = 0
grouper = 0
# Use encoder and grouper to predict on trial data
encoding = encoder.predict(self.trial_data)
......
......@@ -557,6 +557,7 @@ class SEQ_2_SEQ_GMVAE:
# encoding_shuffle = deepof.model_utils.MCDropout(self.DROPOUT_RATE)(encoder)
z_cat = Dense(
self.number_of_components,
name="cluster_assignment",
activation="softmax",
kernel_regularizer=(
tf.keras.regularizers.l1_l2(l1=0.01, l2=0.01)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment