Professional Documents
Culture Documents
CPE EL3 Lab 2 Using TensorFlow for Linear Regression With Synthetic Data
CPE EL3 Lab 2 Using TensorFlow for Linear Regression With Synthetic Data
LABORATORY EXERCISES
I. OBJECTIVES
Internet connection
Google account
Google Colaboratory
III. CONCEPTS/THEORY/CONTENT
Reducing Loss
Loss in the context of model training refers to the difference or deviation between predicted values and
corresponding label or expected value. Minimizing loss is critical during model training, as it affects the
learning process as well as the reliability of a model in making inferences (testing predictions on unseen
data).
Fortunately, there are tools and algorithms that provide an iterative loss reduction for training models. It
follows a trial-and-error process as illustrated in Figure 1.
TensorFlow
TensorFlow is an ML platform of Google that features a rich system ranging from high-level to low APIs
to to develop and train machine learning models. Its hierarchical nature, enables developers to take
advantage of available tools to readily deploy ML models, and at the same time offer support to researchers
and developers to create and explore new machine learning algorithms. The TensorFlow toolkit is illustrated
in Figure 2.
This exercise will make use of keras, a high-level API to train models.
IV. EXERCISES
Use a new colab notebook for this exercise. Aim for a loss of less than 1 if possible by adjusting
the hyperparameters as discussed in the reference learning material. You may use this colab
notebook for reference:
https://colab.research.google.com/drive/1pi_0ru-
JYvRYhExCj3gKY2NhQkWKZye5?usp=sharing