Closed lk251 closed 6 years ago
Hi @lev-kusanagi, I think that error occur during evaluate. I'll comment here when I fix the error. Thank you for the issue.
Thank you @DongjunLee !!
@DongjunLee Could this be similar to the issue in #1 ?
If so, I'm not sure where to put this:
decoder_initial_state = out_cell.zero_state(Config.train.batch_size, self.dtype)
decoder_initial_state.clone(cell_state=self.encoder_final_state)
If it's the solution...
@lev-kusanagi your guess was help me a lot :)
The issue is BeamSearchDecoder in evaluate mode.
ValueError: Shapes must be equal rank, but are 3 and 2 for 'decoder/decoder/while/Select_4' (op: 'Select') with input shapes: [?,5], [?,5,1024], [?,5,1024].
# 5 is beam_width.
So, i fixed that beam search decoder only work in predict mode. pull latest commit then try again.
Thanks @DongjunLee !
@DongjunLee Evaluation seems to work (with main.py), but python chat.py --config cornell-movie-dialogs still produces the same error.
Oh, i also fixed it now.
The problem is impute_finished=True
impute_finished: Python boolean. If True, then states for batch entries which are marked as finished get copied through and the corresponding outputs get zeroed out. This causes some slowdown at each time step, but ensures that the final state and outputs have the correct values and that backprop ignores time steps that were marked as finished.
I changed impute_finished=False
.
Awesome!! Once again, thanks.
Python 3.6.4 Tensorflow 1.4.0
After following the commands in the "Usage" section of the readme: sh scripts/prepare_Cornell_Movie-Dialogs_Corpus.sh python main.py --config cornell-movie-dialogs --mode train_and_evaluate
What might be wrong?