'Run partial discrete, then continuous path.
Args:
switch_layer: this layer and beyond will be continuous'

def _random_sample_switch(self, log_alpha, u, layer, switch_layer, temperature=None):

    if (layer < switch_layer):
        return self._random_sample(log_alpha, u, layer)
    else:
        return self._random_sample_soft(log_alpha, u, layer, temperature)
