One way to get the weights out from the linear layer is simply to pass unit vectors as input together with the actual features. To make this work we need to have weight sharing of the LinearLayer weights across these multiple inputs. This is achieved by the NetMapOperator as mentioned in the documentation.
In[371]:= With[{w = {{1, 2}}},
net = NetMapOperator[
LinearLayer[1, "Input" -> 2, "Weights" -> w, "Biases" -> None]];
]
In[372]:= net[{{2, 3}, {1, 0}, {0, 1}}]
Out[372]= {{8.}, {1.}, {2.}}
PartLayer[1] and PartLayer[2;;3] acting downstream of above in a NetGraph will let you siphon out the relevant pieces from which you can build your error function. Let me know if you need more help.