I think rng should be the last argument and should default to None. In the case where it is None, it is replaced with some class-specific hard-coded seed. This way if you're writing a quick throwaway script you don't need to manually seed it. See pylearn2.linear.conv2d.make_random_conv2d for details.