(self, x)
| 42 | plt.show() |
| 43 | |
| 44 | def get_cost(self, x): |
| 45 | # returns log P(x | model) |
| 46 | # using the forward part of the forward-backward algorithm |
| 47 | # print "getting cost for:", x |
| 48 | return self.session.run(self.cost, feed_dict={self.tfx: x}) |
| 49 | |
| 50 | def log_likelihood(self, x): |
| 51 | return -self.session.run(self.cost, feed_dict={self.tfx: x}) |