bekou / multihead_joint_entity_relation_extraction

Implementation of our papers Joint entity recognition and relation extraction as a multi-head selection problem (Expert Syst. Appl, 2018) and Adversarial training for multi-context joint entity and relation extraction (EMNLP, 2018).
MIT License
413 stars 112 forks source link

config.batchsize!=1, raise error #26

Open Potato-Shy opened 3 years ago

Potato-Shy commented 3 years ago

when I set batchsize=16 or other num, raise error"ValueError: setting an array element with a sequence."in """ _, val, predicted_ner, actual_ner, predicted_rel, actualrel, , m_train = self.sess.run( [operations.train_step, operations.obj, operations.predicted_op_ner, operations.actual_op_ner, operations.predicted_op_rel, operations.actual_op_rel, operations.score_op_rel, operations.m_op], feed_dict=x_train) """ how can i fix it?

disanrenchengcc commented 3 years ago

do you know how to set batchsize? If the batchsize is not 1, it seems that padding will affect the calculation of relationships. How can we remove the effect of padding?