Closed ScottishFold007 closed 4 years ago
修复了word_emb_elmo.py中elmo_embedding的长度问题,请尝试更新一下这个文件
增加了以下代码
max_len = max([len(sent) for sent in sents_tokened])
elmo_embedding = [np.pad(emb, pad_width=((0,0),(0,max_len-emb.shape[1]),(0,0)) , mode='constant') for emb in elmo_embedding]
ValueError: could not broadcast input array from shape (3,41,1024) into shape (3)