This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gradient descent with autodiff for linear regression | |
using Zygote | |
# Data | |
X = randn(1000, 10) | |
b = (1:10) | |
y = X * b + randn(1000) | |
# MSE for linear model | |
function mse(bhat) |