How to write a training program from a test program using Pytorch?

I want to write the training program from the test program about the paper “OptimizingThroughLearnedErrorsforAccurateSportsFieldRegistration”.
But I don’t know how to write a training program from a test program.

Could you explain, what a test program would refer to?
Would it be a specific application?