How to create a dummy model in Tensorflow
The reason is that in your model, you have specified the input size to vary, as the parameter of your function specifies. You have to change your code as follows:

def neural_network_model(input_size, output_size):
network = input_data(shape=[None, input_size, 1], name='input')

network = fully_connected(network, 128, activation='relu')
network = dropout(network, 0.8)

network = fully_connected(network, 256, activation='relu')
network = dropout(network, 0.8)

network = fully_connected(network, 512, activation='relu')
network = dropout(network, 0.8)

network = fully_connected(network, 256, activation='relu')
network = dropout(network, 0.8)

network = fully_connected(network, 128, activation='relu')
network = dropout(network, 0.8)

network = fully_connected(network, output_size, activation='softmax')
network = regression(network, optimizer='adam', learning_rate=LR, loss='categorical_crossentropy', name='targets')
model = tflearn.DNN(network, tensorboard_dir='log')

return model


You have hard coded the output size, which is two, you have to change it to be a variable and during calling, you have to specify the size of your new output, which is four.