mirror of
https://github.com/qurator-spk/eynollah.git
synced 2026-04-14 19:31:57 +02:00
predictor: use predict_on_batch instead of predict
This commit is contained in:
parent
0d21b62aee
commit
219954d15b
1 changed files with 3 additions and 1 deletions
|
|
@ -148,7 +148,9 @@ class Predictor(mp.context.SpawnProcess):
|
|||
jobs.append(jobid)
|
||||
data.append(stack.enter_context(ndarray_shared(shared_data)))
|
||||
data = np.concatenate(data)
|
||||
result = self.model.predict(data, verbose=0)
|
||||
#result = self.model.predict(data, verbose=0)
|
||||
# faster, less VRAM
|
||||
result = self.model.predict_on_batch(data)
|
||||
results = np.split(result, len(jobs))
|
||||
#self.logger.debug("sharing result array for '%d'", jobid)
|
||||
with ExitStack() as stack:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue