Climbing the Mountain with Neural Network

Function Approximation For problems with very large number of states it will not be feasible for our agent to use table to record the value of all the action for each state and make its policy accordingly. In Function approximation agent learns a function which will approxmately give it best action for particular state. In this example we will use […]

Basic Neural Network in PyTorch

Making a simple neural network with a single hidden layer and four neurons in hidden layer. Schema of our Neural Network Import necessary libraries Inputs and outputs Converting basic python array to PyTorch tensors Code to use GPU if available Putting our variable to GPU Defining neural network instantiate neural network Weights of different layers Loss function Only one forward […]