Dependency inversion principle training