###Prompt for Linear Regression NN I want to write python code that demonstrates how we can train a simple neural net to match a set of data, say 10 (x,y) points that we can input. Use pytorch and python. Save the model to a file. Finally, plot the following:
- loss after each epoch.
- The training points in green and then generate 10 test points for x in red and have the model interpolate their y values. Use a scatter plot for both
Write a pytorch program to illustrate developing embeddings for a small dictionary of words. Think first of an interesting dictionary or words and training phrases we can use to train on. Then develop a neural network with the first layer the size of the dictionary that takes in a one-hot vector to designate the word. Then 2 layers of weights where the first layer will represent the embedded word and the next layer will be a argmax to determine the next word.
Write a python program using pytorch to create embeddings for a list of words. Then given the input of one of the words find the 5 closest words to it.