class_docstr: Noise layer for StyleGAN.
  
  This layer can be used to inject the stochastic noise that is used in "A
  Style-Based Generator Architecture for Generative Adversarial Networks".
  https://arxiv.org/pdf/1812.04948.pdf
  
  It samples a single channel Gaussian noise image and broadcasts and adds it to
  the feature channels of the input using a learned per-feature channel scaling
  factor.
class_docstr_tok: ["Noise","layer","for","StyleGAN",".","This","layer","can","be","used","to","inject","the","stochastic","noise","that","is","used","in","``","A","Style-Based","Generator","Architecture","for","Generative","Adversarial","Networks","''",".","https",":","\/\/arxiv.org\/pdf\/1812.04948.pdf","It","samples","a","single","channel","Gaussian","noise","image","and","broadcasts","and","adds","it","to","the","feature","channels","of","the","input","using","a","learned","per-feature","channel","scaling","factor","."]
code: def build(
      self, input_shape: Union[tf.TensorShape, Sequence[tf.TensorShape]]
  ) -> None:
      if not isinstance(input_shape, tf.TensorShape):
          if len(input_shape) != 2:
              raise ValueError(
                  "Either a single input feature map or 2 inputs "
                  "(feature map and noise) are expected."
              )
          feature_map_shape, _ = input_shape
      else:
          feature_map_shape = input_shape
  
      self._per_channel_scales = self.add_weight(
          name="per_channel_scales",
          shape=(feature_map_shape[-1],),
          initializer=tf.keras.initializers.get("zeros"),
          trainable=True,
      )
      super().build(input_shape)
  
imports: import math
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Union, List
  import numpy
  import tensorflow
label_desc: Use image node_id 1 for calling the Noise obj's underlying member method code with example usage: obj.build(input_shape) without return types