Question: Use TensorFlow to predict the next output from a given set of random inputs. Start by importing the necessary libraries. Use Numpy along with TensorFlow
Use TensorFlow to predict the next output from a given set of random inputs. Start by importing the necessary libraries. Use Numpy along with TensorFlow for computations and Matplotlib for plotting.
Complete the following steps:
1) Plot the training data.
2) Create a TensorFlow model by defining the placeholders X and Y so that you can feed your training examples X and Y into the optimizer during the training process.
3) Declare two trainable TensorFlow variables for the weights and bias and initialize them randomly.
4) Define the hyperparameters for the model:
learning_rate = 0.01
training_epochs = 1000
5) Implement Python code for:
the hypothesis,
the cost function,
the optimizer.
6) Implement the training process inside a TensorFlow session.
7) Print out the results for the training cost, weight, and bias.
8) Plot the fitted line on top of the original data.
9) Please provide screenshots of your plots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
