Change the name of this function, it's weights not parameters.