A Framework for Vector-Weighted Deep Neural Networks