Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions gnm/shape/semantic_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _get_rng(rng: np.random.Generator | None) -> np.random.Generator:


class ExpressionSampler:
"""Samples expressions and identities from a Conditional VAE."""
"""Samples expressions from a Conditional VAE."""

def __init__(
self,
Expand Down Expand Up @@ -169,7 +169,9 @@ def sample_expression(
'float32'
)

generated_vectors = self._decoder.predict([z_sample, class_one_hot])
generated_vectors = self._decoder.predict(
[z_sample, class_one_hot], verbose=0
)
class_name = self._expression_names[class_label]
if verbose:
print(
Expand Down Expand Up @@ -231,7 +233,7 @@ def blend_expressions(

# Decode the blended latent vector and weighted average of one-hot labels
blended_expression = self._decoder.predict(
[blended_latent_vector, blended_one_hot_label]
[blended_latent_vector, blended_one_hot_label], verbose=0
)
if verbose:
print(
Expand Down