HF RL Explorer

Task: Compute Gradient of Loss with Respect to a TensorFlow Variable

Task: Compute Gradient of Loss with Respect to a TensorFlow Variable: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that demonstrates how to compute the gradient of a loss function with respect to a TensorFlow variable. The script should define a simple model, compute the…

The task

Write a Python script that demonstrates how to compute the gradient of a loss function with respect to a TensorFlow variable. The script should define a simple model, compute the loss, and then extract the gradient of the loss at a specific variable — without performing an optimization step.

Part of PrimeIntellect/Terminal-Lego-15k.