I assume the number of input features is 103.
In that case, your output is not being broadcasted, but apparently your model is currently overfitting to class4, since the output shape of [29, 1] matches r_out's shape after slicing and the linear layer.