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"]
code: def __init__(
      self,
      initial_noise: tp.Optional[np.ndarray] = None,
      use_gpu: bool = False,
      loss: tp.Optional[imagelosses.ImageLoss] = None,
      mutable_sigma: bool = True,
      sigma: float = 35,
  ) -> None:
      if loss is None:
          loss = imagelosses.Koncept512()
      if not torch.cuda.is_available():
          use_gpu = False
      # Storing high level information..
      if os.environ.get("CIRCLECI", False):
          raise errors.UnsupportedExperiment(
              "ImageFromPGAN is not well supported in CircleCI"
          )
      self.pgan_model = torch.hub.load(
          "facebookresearch/pytorch_GAN_zoo:hub",
          "PGAN",
          model_name="celebAHQ-512",
          pretrained=True,
          useGPU=use_gpu,
      )
  
      self.domain_shape = (1, 512)
      if initial_noise is None:
          initial_noise = np.random.normal(size=self.domain_shape)
      assert initial_noise.shape == self.domain_shape, (
          f"The shape of the initial noise vector was {initial_noise.shape}, "
          f"it should be {self.domain_shape}"
      )
  
      array = ng.p.Array(
          init=initial_noise, mutable_sigma=mutable_sigma
      )
      # parametrization
      array.set_mutation(sigma=sigma)
      array = ng.ops.mutations.Crossover(axis=(0, 1))(array).set_name(
          ""
      )
  
      super().__init__(self._loss, array)
      self.loss_function = loss
      self._descriptors.pop("use_gpu", None)
  
      self.add_descriptors(loss=loss.__class__.__name__)
  
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 1 to create a new ImageFromPGAN object from inherited base classes: base with example: obj = ImageFromPGAN(initial_noise, use_gpu, loss, mutable_sigma, sigma)