what I want do is:
RGB_images = netG(input)   #netG is a pretrained model and not change during training,RGB_images  is a batch of RGB images
YCbCr_images = f(RGB_images)   # YCbCr_images  is a batch of YCbCr mode  images
# do things with YCbCr_images 

Is there any function f in pytorch can achieve what i want?