def _variable_with_weight_decay(name, shape, stddev, wd):
    var = _variable_on_cpu(name, shape, tf.truncated_normal_initializer(stddev=stddev))
    if (wd is not None):
        weight_decay = (tf.nn.l2_loss(var) * wd)
        tf.add_to_collection('losses', weight_decay)
    return var
def _variable_with_weight_decay(name, shape, stddev, wd):
    var = _variable_on_cpu(name, shape, tf.truncated_normal_initializer(stddev=stddev))
    if (wd is not None):
        weight_decay = (tf.nn.l2_loss(var) * wd)
        tf.add_to_collection('losses', weight_decay)
    return var