NiceMartin

Results 9 issues of NiceMartin

在阅读代码,input为什么要写成这种格式 encoder_inputs = tf.placeholder(tf.int32, [input_steps, batch_size], name='encoder_inputs') 而不是 encoder_inputs = tf.placeholder(tf.int32, [batch_size,inputs_steps], name='encoder_inputs') 因为在后面,又需要对输入进行 transpose 操作 feed_dict = {encoder_inputs: np.transpose(unziped[0], [1, 0]), encoder_inputs_actual_length: unziped[1], decoder_targets: unziped[2], intent_targets: unziped[3]} 不知道这样写,有什么目的

在NER中, 一个比较容易出错的地方是由于tokenizer以后, 导致 句子和原始输入的句子长度、token的位置不一致. 在 tokenier.py的代码中, 好像并没有解决 tokenizer输入和输出长度不一致的问题. 例如, 在读入 粗粒度NER的语料后, sents_src, sents_tgt = read_corpus(data_path) 其中的 sents_src[3], sents_tgt[3], 经过 tokenizer以后, 长度并一致, 这样会报错.

在 bert_model.py 的 445行, 下面的代码好像有点问题: extended_attention_mask = extended_attention_mask.unsqueeze(1).unsqueeze(2) if attention_mask is not None : ## 如果传进来的注意力mask不是null,那就直接用传进来的注意力mask 乘 原始mask # 注意 原始mask是extended_attention_mask,这个是用来把pad部分置为0,去掉pad部分影响 extended_attention_mask = attention_mask * extended_attention_mask 在原始的Bert代码中, 是这样的: if attention_mask...

谢谢分享 @imcaspar 能写一下怎样使用吗? 1. 使用该模型继续进行预训练的步骤 2. 使用该模型进行inference的步骤 谢谢

documentation

Hi, when I am running the following code, # Data Repair (more details in section 4.3 of paper) python3 data/spider/scripts/amend_missing_foreign_keys.py data/spider I got the following error message: for i, c...

when using the following method to create data train, val, test = Multi30k.splits(exts=('.de', '.en'), fields=(DE, EN)) I got the following error message ------------------------------ //anaconda/lib/python3.5/site-packages/torchtext/datasets/translation.py in __init__(self, path, exts, fields, **kwargs)...

Hi, I run the main_snli.py, but got an error message in def create_batch(data,from_index, to_index): I changed the following sentence left_sents = torch.cat((dict[word].view(1, -1) for word in lsent)) to left_sents =...

这里的BERT预训练模型是怎样得到的? 或是 直接用BERT做分类任务,没有根据Masked LM和Next sentence 预训练?