Coder Social home page Coder Social logo

hkust-knowcomp / exo-pcr Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 3.16 MB

Source code for EMNLP 2021 paper "Exophoric Pronoun Resolution in Dialogues with Topic Regularization"

License: MIT License

Python 80.71% Jupyter Notebook 17.44% C++ 1.46% Shell 0.40%

exo-pcr's People

Contributors

yucosine avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kelikeli vtfghs

exo-pcr's Issues

Could it be used on any dataset?

Hello, thanks for sharing your great work.
Could this approach be used in an end-to-end manner or a different dataset?

Thanks in advance

Shape of variable hidden weights_0 doesn't match with the shape of tensor

Hi,
I am trying to reproduce your code but got an error:

File "./tensorflow/python/training/checkpoint_utils.py", line 229, in _init_from_checkpoint
    tensor_name_in_ckpt, str(variable_map[tensor_name_in_ckpt])

ValueError: Shape of variable coref_layer/slow_antecedent_scores/hidden_weights_0:0 ((7012, 3000)) doesn't match with shape of tensor coref_layer/slow_antecedent_scores/hidden_weights_0 ([7052, 3000]) from checkpoint reader.

Type error in Similarity

Hi,

When I trained bert_base model with the train.py, it gave me such error after "Loaded 500 eval examples":

Traceback (most recent call last):
File "train.py", line 93, in
eval_summary, eval_f1 = model.evaluate(session, tf_global_step)
File "/Exo-PCR/independent.py", line 738, in evaluate
coref_predictions[example["doc_key"]] = self.evaluate_coref(top_span_starts, top_span_ends, predicted_antecedents, gold_clusters, coref_evaluator)
File "/Exo-PCR/independent.py", line 696, in evaluate_coref
evaluator.update(predicted_clusters, gold_clusters, mention_to_predicted, mention_to_gold)
File "/Exo-PCR/metrics.py", line 23, in update
e.update(predicted, gold, mention_to_predicted, mention_to_gold)
File "/Exo-PCR/metrics.py", line 48, in update
pn, pd, rn, rd = self.metric(predicted, gold)
File "/Exo-PCR/metrics.py", line 128, in ceafe
similarity = sum(scores[matching[:, 0], matching[:, 1]])
TypeError: tuple indices must be integers or slices, not tuple

The logs look fine in TensorBoard. Have you encountered a similar error on your end? Could you please help me take a look what may cause the error?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.