Refactored regression components so that weights are a separate output for the data layer and separate input for the loss layer.: