Torch.zeros_like and torch.mul with no input parms?

In the function test_disc_reasonable(num_images=10), there are lines of code with torch.zeros_like and torch.mul that have no input parms (see below). This is confusing. What do these lines of code accomplish and why do they no require input parms?

z_dim = 64
gen = torch.zeros_like
disc = lambda x: x.mean(1)[:, None]
criterion = torch.mul # Multiply
real = torch.ones(num_images, z_dim)
disc_loss = get_disc_loss(gen, disc, criterion, real, num_images, z_dim, 'cpu')
assert torch.all(torch.abs(disc_loss.mean() - 0.5) < 1e-5)

In python a variable can be an object reference to a function. So what those two lines do is define two new variables, each of which is a function that can later be called with parameters. For example, if you later write:

fake = gen(noise)

You will actually be invoking torch.zeros_like(noise).

Notice that the function get_disc_loss is defined to take functions for several of its arguments. If a python variable can be a function reference, you can also pass that as a parameter to another function, which is what is happening there. They could have directly written torch.zeros_like and torch.mul in the invocation of get_disc_loss, but I think the code as written is clearer.

Thanks for the quick response. That makes perfect sense now. I was not aware that Python had that capability.