import tensorflow as tf

      data_format=data_format,
      weights_initializer=trunc_normal(0.01),
      scope=scope + '/self_gating/transformer_W')

  tile_multiples = [1, t, w, h]
  tile_multiples.insert(index_c, 1)
  weights = tf.tile(weights, tile_multiples)
  weights = tf.nn.sigmoid(weights)

  return tf.multiply(weights, input_tensor)


