Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Debug data shape related error of toy_ctc example (#5864)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soonhwan-Kwon authored and piiswrong committed Apr 17, 2017
1 parent 6b715d2 commit d4e611b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/warpctc/toy_ctc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def gen_rand():
buf = str(num)
while len(buf) < 4:
buf = "0" + buf
ret = np.array([])
ret = []
for i in range(80):
c = int(buf[i // 20])
ret = np.concatenate([ret, gen_feature(c)])
ret.append(gen_feature(c))
return buf, ret

def get_label(buf):
Expand All @@ -56,7 +56,7 @@ def __init__(self, count, batch_size, num_label, init_states):
self.num_label = num_label
self.init_states = init_states
self.init_state_arrays = [mx.nd.zeros(x[1]) for x in init_states]
self.provide_data = [('data', (batch_size, 10 * 80))] + init_states
self.provide_data = [('data', (batch_size, 80, 10))] + init_states
self.provide_label = [('label', (self.batch_size, 4))]

def __iter__(self):
Expand Down

0 comments on commit d4e611b

Please sign in to comment.