We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 88dfe8f + e4cad43 commit dc86d12Copy full SHA for dc86d12
code/rnnslu.py
@@ -288,10 +288,8 @@ def main(param=None):
288
valid_lex, valid_ne, valid_y = valid_set
289
test_lex, test_ne, test_y = test_set
290
291
- vocsize = len(set(reduce(lambda x, y: list(x) + list(y),
292
- train_lex + valid_lex + test_lex)))
293
- nclasses = len(set(reduce(lambda x, y: list(x)+list(y),
294
- train_y + test_y + valid_y)))
+ vocsize = len(dic['words2idx'])
+ nclasses = len(dic['labels2idx'])
295
nsentences = len(train_lex)
296
297
groundtruth_valid = [map(lambda x: idx2label[x], y) for y in valid_y]
0 commit comments