Setup graph for the model