nlp4whp

Results 25 comments of nlp4whp

> model.py 第282行,为什么assert len(final_dists)==1,fina_dists应该是解码序列吧,怎么可能等于1?等于1的话,不相当于每次摘要只有一个字??? decode阶段是单步执行的,每次只取序列中的一个词,只有执行了这一步才能获得当前state

> I followed the instructions to train my models and test, And in decode mode, I set max_dec_step = 1 for running the decoder one step at a time, However...

> @apurvaasf I found an easiest way to export original bert model to SavedModel. > > ```python > # load the checkpoint from bert > # create an estimator which...

That's weird. attention_heads is always 1 also, attention_heads should always be 1 if len(attention_heads) > 1, after concat the shape of `attention_output` will be different then this `attention_output` cannot pass...

> 改成和2.1.3版本一致就可以了,少传入attn_mask这个参数 > > def infer(self, inputs, attn_mask): **last_hidden_states = self.ls_bert.infer(inputs, _attn_mask_)** last_hidden_states = torch.Tensor(last_hidden_states).float() pooled_output = self.pooler(last_hidden_states.to("cuda:0")) logits = self.classifier(pooled_output) return logits > > 但是lightseq性能还不huggingface未加速版本,GPU是 1080Ti > > ====================END...

> 发现新发布的small版本的config文件有些问题,与发布的模型参数不一致,在调用的时候出错,希望作者查看一下。ValueError: Shape of variable bert/embeddings/LayerNorm/beta:0 ((384,)) doesn't match with shape of tensor bert/embeddings/LayerNorm/beta ([128]) from checkpoint reader 是的我也遇到这个问题,zip里`albert_config_small_google.json`并不是合适的参数文件,请问您解决了么 @KunWangR

> 不是的啊。你参考一下「下游任务」的例子 抱歉是我用错了modeling.py,感谢回复

> Hi, @akanimax > I can't solve the OOV problem, either. > My answer about your two questions may be that: > > 1. The words that model doesn't recognize...

hoping for the big gift m(_ _)m

> 这么吃显存吗? 8万条训练数据16g就跑不动了 是的,max_len=100, batch_size=32; 大约占9G, 6层6 * 100 dim的Transformer和BERT一样大:)