fit_tapnet function

Fit the tapnet model to a network