import tensorflow as tf

                # should we be taking the mean elem-wise by batch? i think this is a big bug
                avg_neg_log_lhood = tf.reduce_sum(neg_log_lhoods) / tf.reduce_sum(target_weights)
