My predict() function looks like it is working on the example questions, but then when I try to run the test_predict()
unit test, I get:
<ipython-input-50-ae8bca3db877> in predict(question1, question2, threshold, model, vocab, data_generator, verbose)
33 Q1, Q2 = next(data_generator(Q1=[Q1], Q2=[Q2], batch_size=1, pad=vocab['<PAD>']))
34 # Call the model
---> 35 v1, v2 = model((Q1,Q2))
36 # take dot product to compute cos similarity of each pair of entries, v1, v2
37 # don't forget to transpose the second argument
TypeError: cannot unpack non-iterable NoneType object
Answers to similar questions mentioned to use vocab['<PAD>']
as the pad
argument, but I am already doing that.
Any help would be appreciated, thanks!