tahmedge / CETE-LREC

Source code of the paper "Contextualized Embeddings based Transformer Encoder for Sentence Similarity Modeling in Answer Selection Task" published in LREC 2020.
21 stars 9 forks source link

code #7

Open cxx-cindy opened 3 years ago

cxx-cindy commented 3 years ago

Hello, when I execute feature-based code, I report an error. What's going on? In addition, I would like to ask about EMB = "E: / h5py data / Bert"_ Does file / Bert "in config.py need to be downloaded by yourself? Where can I download it?

error: D:\Anaconda\envs\transformer\python.exe "D:/研究生/论文代码/Contextualized Embeddings based Transformer Encoder for Sentence Similarity Modeling in Answer Selection Task/CETE-LREC-master/CETE Feature-Based/Model_Transformer/train.py" Traceback (most recent call last): File "D:/研究生/论文代码/Contextualized Embeddings based Transformer Encoder for Sentence Similarity Modeling in Answer Selection Task/CETE-LREC-master/CETE Feature-Based/Model_Transformer/train.py", line 4, in from utils import File "D:\研究生\论文代码\Contextualized Embeddings based Transformer Encoder for Sentence Similarity Modeling in Answer Selection Task\CETE-LREC-master\CETE Feature-Based\Model_Transformer\utils.py", line 16, in from train import return_file_name File "D:\研究生\论文代码\Contextualized Embeddings based Transformer Encoder for Sentence Similarity Modeling in Answer Selection Task\CETE-LREC-master\CETE Feature-Based\Model_Transformer\train.py", line 6, in from model import File "D:\研究生\论文代码\Contextualized Embeddings based Transformer Encoder for Sentence Similarity Modeling in Answer Selection Task\CETE-LREC-master\CETE Feature-Based\Model_Transformer\model.py", line 14, in from train import return_file_name,return_emb1,return_emb2 ImportError: cannot import name 'return_file_name'

Process finished with exit code 1

HHL-445 commented 2 years ago

Hello, have you solved this problem? I imported the h5 file of bert downloaded by hugeface and still got an error. @cxx-cindy