Skip to content

Commit

Permalink
style: bit misspell code comment loss utils
Browse files Browse the repository at this point in the history
Comment in three lines section.
  • Loading branch information
guspan-tanadi authored Apr 15, 2023
1 parent 0dc89d1 commit 4d46fbe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ def viterbi(y, A, B, Pi=None):
T1 = np.empty((K, T), 'd')
T2 = np.empty((K, T), 'B')

# Initilaize the tracking tables from first observation
# Initialize the tracking tables from first observation
T1[:, 0] = Pi * B[:, y[0]]
T2[:, 0] = 0

# Iterate throught the observations updating the tracking tables
# Iterate through the observations updating the tracking tables
for i in range(1, T):
T1[:, i] = np.max(T1[:, i - 1] * A.T * B[np.newaxis, :, y[i]].T, 1)
T2[:, i] = np.argmax(T1[:, i - 1] * A.T, 1)
Expand Down Expand Up @@ -523,7 +523,7 @@ def stamp2label(matrices, time_stamps):


def get_pos_samples(matrix_row, stamp):
# caculate each row
# calculate each row
# matrix tensor[1 ,T] stamp [1,2]
start = int(stamp[0])
end = int(stamp[1])
Expand Down

0 comments on commit 4d46fbe

Please sign in to comment.