Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
shockline committed Mar 19, 2016
1 parent 80d8a50 commit e3bd91c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions algorithms/dialog/GRU_2NN_recons.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ def getDeployFunction(self, cr):

recons_h_error_L = T.tanh(media_h) - T.addbroadcast(self.last_decoder_hidden, 0)
recons_h_error_L = T.sqr(recons_h_error_L).sum(axis=1)
recons_h_error_L = recons_h_error_L/ self.options['hidden_dim']
recons_h_error_L = recons_h_error_L / self.options['hidden_dim']
error = -T.log(pred_word_probability) + recons_h_error_L

score = -error
pred_word = T.argmin(error)

deploy_model = theano.function(inputs=[self.answer, self.answer_mask, self.last_hidden_state],
outputs=[pred_word, error],
outputs=[pred_word, score],
allow_input_downcast=True)
print "Compiled."
def dm(sentence):
Expand Down

0 comments on commit e3bd91c

Please sign in to comment.