Linear Autoencoder Reconstruction Loss
~10 mincode completion
Implement autoencoder_loss(X, W_enc, b_enc, W_dec, b_dec) returning L as a float.
Where this shows up
~10 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 autoencoder_loss(X, W_enc, b_enc, W_dec, b_dec):
"""
Reconstruction loss of a linear autoencoder.
Args:
X: images, shape (n, d), one per row
W_enc: encoder weights, shape (d, k)
b_enc: encoder bias, shape (k,)
W_dec: decoder weights, shape (k, d)
b_dec: decoder bias, shape (d,)
Returns:
float: mean over images of the summed squared error
"""
# YOUR CODE HERE
pass