Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f750e73

Browse files
committedMay 15, 2018
remove P
1 parent 3f301f6 commit f750e73

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
 

‎hmm_class/hmmd_tf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ def log_likelihood(self, x):
5151
return -self.session.run(self.cost, feed_dict={self.tfx: x})
5252

5353
def get_cost_multi(self, X):
54-
P = np.random.random(len(X))
55-
return np.array([self.get_cost(x) for x, p in zip(X, P)])
54+
return np.array([self.get_cost(x) for x in X])
5655

5756
def build(self, preSoftmaxPi, preSoftmaxA, preSoftmaxB):
5857
M, V = preSoftmaxB.shape

‎hmm_class/hmmd_theano2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@ def log_likelihood(self, x):
8787
return -self.cost_op(x)
8888

8989
def get_cost_multi(self, X):
90-
P = np.random.random(len(X))
91-
return np.array([self.get_cost(x) for x, p in zip(X, P)])
90+
return np.array([self.get_cost(x) for x in X])
9291

9392
def set(self, preSoftmaxPi, preSoftmaxA, preSoftmaxB):
9493
self.preSoftmaxPi = theano.shared(preSoftmaxPi)

0 commit comments

Comments
 (0)
Please sign in to comment.