Skip to content

Commit

Permalink
Fix Asserting error for one hot encoding
Browse files Browse the repository at this point in the history
This should resolve [issue76](harvitronix#76) when running by train.py  for 'lstm' model.
  • Loading branch information
mertia-himanshu committed May 25, 2018
1 parent fd5cafe commit 2c1a629
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def get_class_one_hot(self, class_str):
# Now one-hot it.
label_hot = to_categorical(label_encoded, len(self.classes))

assert len(label_hot) == len(self.classes)
assert len(label_hot[0]) == len(self.classes)

return label_hot
return label_hot[0]

def split_train_test(self):
"""Split the data into train and test groups."""
Expand Down

0 comments on commit 2c1a629

Please sign in to comment.