def predictor(q, ):
for i in tqdm(range(0, len(ids_test), batch_size)):
x_batch = q.get()
with graph.as_default():
preds = model.predict_on_batch(x_batch)
preds = np.squeeze(preds, axis=3)
for pred in preds:
prob = cv2.resize(pred, (orig_width, orig_height))
mask = prob > threshold
rle = run_length_encode(mask)
rles.append(rle)
test_submit_multithreaded.py 文件源码
python
阅读 33
收藏 0
点赞 0
评论 0
评论列表
文章目录