My presentation on Machine Learning using the popular TensorFlow library. I compare an implementation of linear regression without the library, and another implementation using the library.
28. epochs = 10
model = Model()
for i in range(epochs):
train(model, X_train, y_train, alpha=0.1)
print(model.W)
29. ● Vectors & Matrices
● Matrix Dot Products
● Differentiation
What was all that?
We got introduced to
● Learning Rates
● Gradient Descent
● Training Epochs
30. All of that was Linear Regression. How
about Neural Networks?
31. import tensorflow as tf
from tensorflow import keras
model = keras.Sequential([
keras.layers.Dense(50, input_shape=(7,), activation='relu'),
keras.layers.Dense(50, activation='relu'),
keras.layers.Dense(50, activation='relu'),
keras.layers.Dropout(0.5),
keras.layers.Dense(1)
])
print(model.summary())