weights_init is defined inside the class, you are trying (I think, u put no code) to call it from outside the class.
You should call
net.apply(net.weights_init)
But it makes no sense to define it inside the class.