def time_theano_fn(fn, index, GPU_bool):
if GPU_bool:
theano.sandbox.cuda.synchronize()
start = time.time()*1000
fn(index)
if GPU_bool:
theano.sandbox.cuda.synchronize()
elapsed_time = time.time()*1000 - start
return elapsed_time
评论列表
文章目录