Implementation of higher order gradients (can backpropagate through the gradient calculation of the Coords2Grid pytorch layer). Introduce notion of epochs, including support for iterating an epoch at a time rather than continuously. Fixed bug with duplicate_poses. Support for truncated gradient representation.