Started writing code for general training (not only pascal dataset).