CopyNet
CopyNet copied to clipboard
CopyNet Implementation with Tensorflow and nmt
I use the CopyNetWapper to wrap a decoder, this is my code: ``` train_decoder = tf.contrib.seq2seq.AttentionWrapper(decoder, attention_mechanism, attention_layer_size=self.config.PHVM_decoder_dim) train_encoder_state = train_decoder.zero_state(self.batch_size, dtype=tf.float32).clone( cell_state=sent_dec_state) copynet_decoder = CopyNetWrapper(train_decoder, sent_input, sent_lens, sent_lens, self.tgt_vocab_size)...
OOV means the out of vocalbary word. I can't find any code to handle the problem, maybe I miss some important steps? Looking forward to your advice or answers.
ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[100,32,367]
hello, when I set the parameters as followed: --num_layers=1 --num_nuits=32 --share_vocab=True --copynet=True --gen_vocab_size=500 my gpu is 12206Mib,it returns the error: ResourceExhaustedError (see above for traceback): OOM when allocating tensor with...
Thanks a lot for your job about CopyNet. I don't understand the parameters _**vocab_size**_ and _**gen_vocab_size**_ clearly. For example, if i have a vocabulary table contains 9999 words and a...
Is it correct that the size of prob_c is self._encoder_state_size? I think it must be maximum sequence length. Thanks.
It works perfectly fine with the Greedy decoder. Here is the code Tensorflow: 1.8.0 ``` encoder_emb_inp = tf.nn.embedding_lookup(embeddings, x) encoder_cell = rnn.GRUCell(rnn_size,name='encoder') encoder_outputs, encoder_state= tf.nn.dynamic_rnn(encoder_cell,encoder_emb_inp,sequence_length=len_docs,dtype=tf.float32) tiled_encoder_outputs = tf.contrib.seq2seq.tile_batch(encoder_outputs, multiplier=beam_width) tiled_sequence_length...
Hi there, the code is not working when I set the parameters **beam_width** and **num_translations_per_input** to be ≥ 1. E.g., when I set the beam_width=9, batch_size=32, the error information is...
I got the error when training a CopyNet model as belows: NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or...
Hi all, I would like to know how to adjust the parameter of CopyNet network to control whether or not copy the source words during decoder. Where is the the...