Which dependency do I need to install for Generator?

I try to get [this]( How to use) transformer running local in VSC. I get stuck at this line

generator = Generator(in_channels=256, out_channels=3)

Which Generator method is used here i.e what dependency do I need to install? The [Generator] (Generator — PyTorch 1.12 documentation) method from PyTorch is it not because it takes different input parameters.