We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3a04ac commit 7e2d20bCopy full SHA for 7e2d20b
1 file changed
src/microtc.jl
@@ -118,6 +118,12 @@ function predict_corpus(tc::MicroTC, corpus;
118
normalize=true)
119
120
V = vectorize_corpus(tc.textmodel, corpus; normalize, minbatch)
121
+
122
+ for v in V
123
+ if length(v) == 0 # empty vector
124
+ v[rand(1:vocsize(tc.textmodel))] = 1f0
125
+ end
126
127
#don't know if liblinear prediction is multithreading
128
n = length(V)
129
# minbatch = getminbatch(minbatch, n)
0 commit comments