Skip to content

Commit

Permalink
condition strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidtronix committed Dec 16, 2024
1 parent ce66b0e commit 3e94259
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ml4h/models/diffusion_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def condition_layer_film(input_tensor, control_vector, filters):
beta = layers.Dense(filters, activation="linear")(control_vector)

# Reshape gamma and beta to match the spatial dimensions
gamma = tf.reshape(gamma, (-1,) + input_tensor.shape[1:-1] + (filters,))
beta = tf.reshape(beta, (-1,) + input_tensor.shape[1:-1] + (filters,))
#gamma = tf.reshape(gamma, (-1,) + input_tensor.shape[1:-1] + (filters,))
#beta = tf.reshape(beta, (-1,) + input_tensor.shape[1:-1] + (filters,))
# Apply FiLM (Feature-wise Linear Modulation)
return input_tensor * gamma + beta

Expand Down

0 comments on commit 3e94259

Please sign in to comment.