Actually I think the more logical move might be to remove constrain_updates function because it is not being used anywhere else. I'm using constrain_update function. Because currently we only define the constraint only on weight matrices of each layer. I call constrain_update function from the censor_updates function of MLP class.