class_docstr: Residual Switch Unit of Residual Shuffle-Exchange network.
class_docstr_tok: ["Residual","Switch","Unit","of","Residual","Shuffle-Exchange","network","."]
docstr: Initialize Switch Layer.
  
  Args:
    prefix: Name prefix for switch layer
    dropout: Dropout rate
    mode: Training mode
    **kwargs: more arguments (unused)
docstr_tok: ["Initialize","Switch","Layer",".","Args",":","prefix",":","Name","prefix","for","switch","layer","dropout",":","Dropout","rate","mode",":","Training","mode","*","*","kwargs",":","more","arguments","(","unused",")"]
code: def __init__(self, prefix, dropout, mode, **kwargs):
      """Initialize Switch Layer.
  
      Args:
        prefix: Name prefix for switch layer
        dropout: Dropout rate
        mode: Training mode
        **kwargs: more arguments (unused)
      """
      super().__init__(**kwargs)
      self.prefix = prefix
      self.dropout = dropout
      self.mode = mode
      self.first_linear = None
      self.second_linear = None
      self.layer_norm = None
      self.residual_scale = None
  
      residual_weight = 0.9
      self.candidate_weight = np.sqrt(1 - residual_weight**2) * 0.25
      self.init_value = inv_sigmoid(residual_weight)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers.common_layers import gelu
  from tensor2tensor.models.research.shuffle_network import reverse_shuffle_layer
  from tensor2tensor.models.research.shuffle_network import shuffle_layer
  from tensor2tensor.models.research.shuffle_network import ShuffleNetwork
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 to create a new RSU object from inherited base classes: tf.keras.layers with example: obj = RSU(prefix, dropout, mode)