from bert_lstm_ner import create_model, InputFeatures, InputExample from bert import tokenization @@ -93,6 +94,7 @@ def convert(line): while True: print('input the test sentence:') sentence = str(input()) start = datetime.now() if len(sentence) < 2: print(sentence) continue @@ ...
num_units, dir_count, max_seq_length, batch_size, cell_num_units]: [1, 2048, 2048, 1, 63, 12, 2048] [[{{node tower_0/cudnn_lstm/CudnnRNNV3_1}}]] (1) Internal: Failed to call ThenRnnForward with model config
什么是Seq2SeqSeq2Seq模型,全称Sequence to sequence,由Encoder和Decoder两个部分组成,每部分都是一个RNNCell(RNN、LSTM、GRU等)结构。Encoder将一个序列编码为一个固定长度的语义向量,Decoder将该语义向量解码为另一个序列。输入序列和输出序列都可以是不定长序列。Seq2Seq可以用于机器翻译、文本摘要生成、对话生成等...