wonjininfo / CollaboNet

CollaboNet for Biomedical Named Entity Recognition
MIT License
48 stars 10 forks source link

Error when running on STM model #10

Open collin0825 opened 1 year ago

collin0825 commented 1 year ago

when running python run.py --ncbi --jnlpba --bc5_chem --bc5_disease --bc4 --bc2 --lr_pump --lr_decay 0.05 this command occur error like below: File "C:\Users\user\Desktop\collab_net\run.py", line 76, in ID2wordVecIdx, wordVec2LineNo, wordEmbedding = input_wordVec() File "C:\Users\user\Desktop\collab_net\ops\inputData.py", line 35, in input_wordVec ID2wordVecIdx, wordVec2LineNo, wordEmbedding = wiki_wordVecProcessing(word2ID, word2IDTD) File "C:\Users\user\Desktop\collab_net\ops\embeddingOps.py", line 13, in wiki_wordVecProcessing wordVec2LineNo, wordEmbedding = wiki_loadWordVec(wordVecFilePath) File "C:\Users\user\Desktop\collab_net\ops\embeddingOps.py", line 37, in wiki_loadWordVec wordVecArrayTmp=np.asarray(vectList,dtype='float32') ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (98735,) + inhomogeneous part. environment: python 3.9 tensorflow-gpu 2.11

youssef-snoussi commented 1 year ago

Hi, you can refer to this issue it'll help you prepare the right environment as well as getting the necessary files. Note, this won't work on Python 3 nor tensorflow 2

collin0825 commented 1 year ago

but there is no tensorflow-gpu 1.7 can install if I install tensorflow-gpu 1.8 it occur this error - tensorflow-gpu==1.8.0 -> python[version='>=3.10,<3.11.0a0|>=3.6,<3.7.0a0|>=3.5,<3.6.0a0']

collin0825 commented 1 year ago

my os is window is that the problem?