Deep Forward and Inverse Perceptual Models for Tracking and Prediction