Core Functions for DNNs