import keras import numpy as np model = keras.Sequential([keras.layers.Dense(units=1, input_shape=)]) model.compile(optimizer='sgd',loss='mean_squared_error') xs = np.array([-1.0, 0.0, 1.0, 2.0, 3.0, 4.0], dtype=float) ys = np.array([-3.0, -1.0, 1.0, 3.0, 5.0, 7.0], dtype=float) model.fit(xs, ys, epochs=500) print(model.predict([10,0]))
The diagram for traditional programming had Rules and Data In, but what came out?
Binary ( X ), Machine Learning (x) Answer
The diagram for Machine Learning had Answers and Data In, but what came out?
Models ( X ) Bugs ( X ) Binary ( X) Rules
When I tell a computer what the data represents (i.e. this data is for walking, this data is for running), what is that process called?
Learning Data ( X ) Programming the Data ( X ) Categorizing the data ( X ) Labelling the Data
What is a Dense?
A layer of disconnected neurons ( X ) A layer of connected neurons
What does a Loss function do?
Decides to stop training a neural network ( X ) Generates a guess ( X ) Measures how good the current ‘guess’ is
What does the optimizer do?
Generates a new and improved guess
What is Convergence?
The process of getting very close to the correct answer
What does model.fit do?
It makes a model fit available memory ( X ) It trains the neural network to fit one set of values to another
What’s the name of the dataset of Fashion images used in this week’s code?
What do the above mentioned Images look like?
How many images are in the Fashion MNIST dataset?
Why are there 10 output neurons?
There are 10 different labels
What does Relu do?
For a value x, it returns 1/x ( X ) It only returns x if x is greater than zero
Why do you split data into training and test sets?
To train a network with previously unseen data ( X ) To make training quicker ( X ) To test a network with previously unseen data
What method gets called when an epoch finishes?
on_epoch_finished ( X ) On_training_complete ( X ) on_epoch_end
What parameter to you set in your fit function to tell it to use callbacks?