You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in gensamples(X, X_test, Y_test, avoid, avoid_score, skips, k, batch_size, short, temperature, use_unk)
38 fold_start = vocab_fold(start)
39 sample, score = beamsearch(predict=keras_rnn_predict, start=fold_start, avoid=avoid, avoid_score=avoid_score,
---> 40 k=k, temperature=temperature, use_unk=use_unk)
41 assert all(s[maxlend] == eos for s in sample)
42 samples += [(s,start,scr) for s,scr in zip(sample,score)]
in beamsearch(predict, start, avoid, avoid_score, k, maxsample, use_unk, oov, empty, eos, temperature)
27 # for every possible live sample calc prob for every possible label
28 probs = predict(live_samples, empty=empty)
---> 29 assert vocab_size == probs.shape[1]
30
31 # total score for every sample is sum of -log of word prb
IndexError: tuple index out of range'
The text was updated successfully, but these errors were encountered:
When executing the command
samples = gensamples(X=X, skips=2, batch_size=batch_size, k=10, temperature=1.)
If X is the same size of maxlend nothing gets outputted. If X is larger or smaller than maxlend then I get the following error:
'HEADS:
IndexError Traceback (most recent call last)
in ()
----> 1 samples = gensamples(X=X, skips=2, batch_size=batch_size, k=10, temperature=1.)
in gensamples(X, X_test, Y_test, avoid, avoid_score, skips, k, batch_size, short, temperature, use_unk)
38 fold_start = vocab_fold(start)
39 sample, score = beamsearch(predict=keras_rnn_predict, start=fold_start, avoid=avoid, avoid_score=avoid_score,
---> 40 k=k, temperature=temperature, use_unk=use_unk)
41 assert all(s[maxlend] == eos for s in sample)
42 samples += [(s,start,scr) for s,scr in zip(sample,score)]
in beamsearch(predict, start, avoid, avoid_score, k, maxsample, use_unk, oov, empty, eos, temperature)
27 # for every possible live sample calc prob for every possible label
28 probs = predict(live_samples, empty=empty)
---> 29 assert vocab_size == probs.shape[1]
30
31 # total score for every sample is sum of -log of word prb
IndexError: tuple index out of range'
The text was updated successfully, but these errors were encountered: