import tensorflow as tf

        logits = tf.add(logits, output_bias)

        probabilities=tf.sigmoid(logits)
        # labels=tf.constant(labels,dtype=tf.int32)

        per_example_loss=tf.losses.sigmoid_cross_entropy(multi_class_labels=labels, logits=logits,reduction=Reduction.NONE)
        per_example_loss=tf.reduce_sum(per_example_loss,axis=-1)
        loss = tf.reduce_mean(per_example_loss,name='train_loss')

        return (loss, per_example_loss, logits, probabilities)


def model_fn_builder(bert_config, num_labels, init_checkpoint, learning_rate,
                     num_train_steps, num_warmup_steps, use_tpu,
