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","."]
docstr: Returns noise with dimensions corresponding to the input.
  
  Args:
    inputs: A single tensor containing the feature_map to which random noise
      is added or two tensors containing the feature_map and the single
      channel noise.
  
  Returns:
    The feature map with the per channel scaled noise added.
docstr_tok: ["Returns","noise","with","dimensions","corresponding","to","the","input",".","Args",":","inputs",":","A","single","tensor","containing","the","feature_map","to","which","random","noise","is","added","or","two","tensors","containing","the","feature_map","and","the","single","channel","noise",".","Returns",":","The","feature","map","with","the","per","channel","scaled","noise","added","."]
code: def call(
      self, inputs: Union[Sequence[tf.Tensor], tf.Tensor]
  ) -> tf.Tensor:
      """Returns noise with dimensions corresponding to the input.
  
      Args:
        inputs: A single tensor containing the feature_map to which random noise
          is added or two tensors containing the feature_map and the single
          channel noise.
  
      Returns:
        The feature map with the per channel scaled noise added.
      """
      if isinstance(inputs, tf.Tensor):
          batch_size, height, width = tf.unstack(tf.shape(inputs)[:3])
          noise = tf.random.truncated_normal(
              shape=(batch_size, height, width, 1)
          )
          feature_map = inputs
      else:
          feature_map, noise = inputs
      return noise * self._per_channel_scales + feature_map
  
imports: import math
  from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Union, List
  import numpy
  import tensorflow
label_desc: Use image node_id 2 for calling the Noise obj's underlying member method code with example usage: obj.call(inputs) and returns: unknown