A Safe, Secure, and Predictable Software Architecture for Deep Learning in Safety-Critical Systems