Open nournia opened 8 years ago
@nournia Does 'log_probability' here give you the sentence probability?
I've updated that piece of code and removed log
from probability computation.
It returns 'nan' when I try this piece of code for any sentence. Do you get the floating point probabilities with this @nournia ?
It works for me.
Are you getting proper results from sample.py
script?
I got the error 'tuple' object has no attribute 'eval' when applying your code. It's 'state = self.cell.zero_state(1, tf.float32).eval(session=session)' that go wrong. Can you help me with handling this?
Why is probability the mean
of the character probabilities? Shouldn't it be the product?
Hi, I'm using
char-rnn
for computing sentence probability, which is main functionality of language modeling. This piece of code feeds sentence chars one by one and finds out probability of correctly predicting next char:It works fine and prefers well written sentences from sick ones. But I think it's not optimized for performance. Is it possible to feed one sequence of chars and receive generation probabilities for each one of them given previous chars? Currently, it seems that data transfer between host and device is a major bottleneck.