'Create a NoisyTopKGating network.
Args:
hp: a hyperparameters created by NoisyTopKGatingParams()
name: a string'

def __init__(self, hp, name):

    self._vars = []
    self._hp = hp
    self._w_gate = tf.get_variable(('%s_gate' % name), [hp.input_size, hp.num_experts], hp.dtype, hp.initializer)
    self._vars.append(self._w_gate)
    if hp.noisy_gating:
        self._w_noise = tf.get_variable(('%s_noise' % name), [hp.input_size, hp.num_experts], hp.dtype, hp.initializer)
        self._vars.append(self._w_noise)
