Saturating vs Non-Saturating Generator Loss
~12 mincode completion
Implement generator_losses(d_fake) returning [L_sat, L_ns, g_sat, g_ns], where the two gradients are the per-sample logit derivatives averaged over the batch.
Where this shows up
~12 min
••••••••••••••••
8 employers weight this skill
4 autonomy companies, 1 enterprise vendor, 1 defense company, 1 health and bio company, 1 AI product company. Top match scores 87.
Python
import numpy as np
def generator_losses(d_fake):
"""
Saturating and non-saturating generator losses and their logit gradients.
Args:
d_fake: discriminator probabilities on fake images, shape (n,)
Returns:
array [L_sat, L_ns, g_sat, g_ns]
"""
# YOUR CODE HERE
pass