create a chatbot using python part 3
Developing a Model Now that we have preprocessed all of our data we are ready to start creating and training a model. For our purposes we will use a fairly standard feed-forward neural network with two hidden layers. The goal of our network will be to look at a bag of words and give a class that they belong too (one of our tags from the JSON file). We will start by defining the architecture of our model. Keep in mind that you can mess with some of the numbers here and try to make an even better model! A lot of machine learning is trial an error. tensorflow . reset_default_graph () net = tflearn . input_data ( shape = [ None , len ( training [ 0 ])]) net = tflearn . fully_connected ( net , 8 ) net = tflearn . fully_connected ( net , 8 ) net = tflearn . fully_connected ( net , len ( output [ 0 ]), activation = "softmax" ) net = tflearn . regression ( net ) model = tflearn . DNN ( net ) Training & Saving the Model Now that we have setup our model its t...