A Dictionary Approach to Domain-Invariant Learning in Deep Networks