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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started