Multi-layer Representation Learning for Robust OOD Image Classification