import tensorflow as tf

        f = open(self.log_file, 'w')
        f.close()

def weight_variable(shape):
    return tf.get_variable('W', shape, initializer=tf.random_normal_initializer(0., 0.02))

def bias_variable(shape):
    return tf.get_variable('b', shape, initializer=tf.constant_initializer(0.))

def keep_prob(dropout, train):
    return tf.cond(train, lambda: tf.constant(dropout), lambda: tf.constant(1.))

def softmax_ce_with_logits(logits, labels):
    return tf.nn.softmax_cross_entropy_with_logits(labels=labels, logits=logits)

def sigmoid_ce_with_logits(logits, labels):
    return tf.nn.sigmoid_cross_entropy_with_logits(labels=labels, logits=logits)

def sigmoid_kl_with_logits(logits, targets):
    assert isinstance(targets, float)
