Skip to content

Commit

Permalink
Fixed speech example
Browse files Browse the repository at this point in the history
  • Loading branch information
neubig committed Jul 3, 2017
1 parent 1287af5 commit aa447b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/speech.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defaults:
layers: 1
downsampling_method: skip
input_dim: 240
hidden_dim: 63
hidden_dim: 64
attender: !StandardAttender
state_dim: 64
hidden_dim: 64
Expand Down
2 changes: 1 addition & 1 deletion xnmt/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __getitem__(self, key):
return self.nparr.__getitem__(key)
def get_padded_sent(self, token, pad_len):
if pad_len>0:
self.nparr = np.append(self.nparr, np.repeat(token.reshape(1,len(token)), pad_len, axis=0), axis=0)
self.nparr = np.append(self.nparr, np.zeros((pad_len, self.nparr.shape[1])), axis=0)
return self
def get_array(self):
return self.nparr
Expand Down

0 comments on commit aa447b1

Please sign in to comment.