def __init__(self, dim): ''' DESCRIPTION: multinomial sample one output from the softmax probability PARAM: dim (int): layer dimension ''' self.diag = tf.diag(tf.ones(dim))