class_docstr: Creates face images using a GAN from pytorch GAN zoo trained on celebAHQ and optimizes the noise vector of the GAN
  
  Parameters
  ----------
  problem_name: str
      the type of problem we are working on.
  initial_noise: np.ndarray
      the initial noise of the GAN. It should be of dimension (1, 512). If None, it is defined randomly.
  use_gpu: bool
      whether to use gpus to compute the images
  loss: ImageLoss
      which loss to use for the images (default: Koncept512)
  mutable_sigma: bool
      whether the sigma should be mutable
  sigma: float
      standard deviation of the initial mutations
class_docstr_tok: ["Creates","face","images","using","a","GAN","from","pytorch","GAN","zoo","trained","on","celebAHQ","and","optimizes","the","noise","vector","of","the","GAN","Parameters","--","--","--","--","--","problem_name",":","str","the","type","of","problem","we","are","working","on",".","initial_noise",":","np.ndarray","the","initial","noise","of","the","GAN",".","It","should","be","of","dimension","(","1",",","512",")",".","If","None",",","it","is","defined","randomly",".","use_gpu",":","bool","whether","to","use","gpus","to","compute","the","images","loss",":","ImageLoss","which","loss","to","use","for","the","images","(","default",":","Koncept512",")","mutable_sigma",":","bool","whether","the","sigma","should","be","mutable","sigma",":","float","standard","deviation","of","the","initial","mutations"]
docstr: Generates images tensor of shape [nb_images, x, y, 3] with pixels between 0 and 255
docstr_tok: ["Generates","images","tensor","of","shape","[","nb_images",",","x",",","y",",","3","]","with","pixels","between","0","and","255"]
code: def _generate_images(self, x: np.ndarray) -> np.ndarray:
      """Generates images tensor of shape [nb_images, x, y, 3] with pixels between 0 and 255"""
      # pylint: disable=not-callable
      noise = torch.tensor(x.astype("float32"))
      # type: ignore
      return (
          (
              (self.pgan_model.test(noise).clamp(min=-1, max=1) + 1)
              * 255.99
              / 2
          )
          .permute(0, 2, 3, 1)
          .cpu()
          .numpy()
      )
  
imports: import os
  import itertools
  from pathlib import Path
  import cv2
  import numpy
  import PIL.Image
  import torch.nn
  import torch
  import torchvision
  from torchvision.models import resnet50
  import torchvision.transforms
  import nevergrad
  import nevergrad.common.typing
  from nevergrad.common import errors
  from ..None import base
  from .None import imagelosses
label_desc: Use image node_id 3 for calling the ImageFromPGAN obj's underlying member method code with example usage: obj._generate_images(x) and returns: unknown