python - Is there anyway I can reset the cell state to zero for seq2seq model in Tensorflow -
i have several paragraphs in input text, each para doesn't have of correlation other paras. so, thinking of resetting cell state 0 every time input in new paragraph. there way of doing that.
each para length fixed - gets inputted in 22 batches. have written following cell state 0 doesn't work
if self.batch_pointer % 22 == 0: self.initial_state = cell.zero_state(args.batch_size, tf.float32)
the state variable passed in following way
outputs, last_state = legacy_seq2seq.rnn_decoder(inputs, self.initial_state, cell, scope='rnnlm')
here cell refers to
cell = rnn.multirnncell([rnn.basiclstmcell(n_hidden),rnn.basiclstmcell(n_hidden)])
context:
input: set of paragraphs
output: generated text starting random has similar style of input text
Comments
Post a Comment