AIChallenger / AI_Challenger_2017

AI Challenger, a platform for open datasets and programming competitions to artificial intelligence (AI) talents around the world.
https://challenger.ai/
474 stars 196 forks source link

中文caption,inference特别慢 #28

Closed JinmingZhao closed 6 years ago

JinmingZhao commented 6 years ago

validation和test都是一张一张的caption, 1080卡,测一次要几个小时,大家也没遇到这个问题吗?

chenghuige commented 6 years ago

每次inference 一组 batch size可以取500

JinmingZhao commented 6 years ago

@chenghuige 提供的 run_inference.py 是不支持这个的,每次beam_search的时候传的是一张图片,用batch_size需要自己根据train的inputs格式去改?

chenghuige commented 6 years ago

@JinmingZhao 别的框架不太清楚 如果你用tf的话 可以搜一下beam search相关的,im2txt提供的是out graph的beam search 每次inference 只能有一个图片 而且out graph inference 本身由于数据交互 就比较慢 你可以参考google/seq2seq提供的ingraph beam search

https://github.com/tensorflow/tensorflow/issues/654

I'd recommend using the google/seq2seq github repo. It's a very good, complete and maintained seq2seq implementation. Beam search is here: https://github.com/google/seq2seq/blob/master/seq2seq/inference/beam_search.py

JinmingZhao commented 6 years ago

@chenghuige 非常感谢! 刚开始做caption, 见谅!

daicoolb commented 5 years ago

你好,请问中文caption inference特别慢的问题解决了么