Custom training loops and subclassing with Tensorflow

1 · Stathis Kamperis · Dec. 20, 2020, midnight
Contents Introduction Fit linear regression model to data by minimizing MSE Generate training data Create a custom Keras layer Define a custom loss function Train the model with a custom training loop Fit Gaussian curve to data with maximum likelihood estimation What is likelihood? A concrete example of maximum likelihood estimation How is mean squared error related to log-likelihood? Introduction The most straightforward way to train a model in Tensorflow is to use the model.fit() and m...