TensorFlow nerds: If I want to measure Keras model inference time, can I do it by just sticking it in a for loop after a warmup? Or is there some other synchronization I should be doing?
-
-
Replying to @PiotrTeterwak
That's pretty much what I did for one of our papers. Not Keras, which I'd be careful about benchmarking since it's usually very unoptimized, and we also hand-tuned our baselines and benchmarked them in the same way.https://github.com/google-research/google-research/blob/master/sgk/mbv1/main.py#L204 …
2 replies 0 retweets 4 likes -
Replying to @Tgale96 @PiotrTeterwak
Did you encounter any performance issues with Keras? Would love to hear about it. The TF continuous perf benchmarks have been running on Keras models since 2018 and the team has spent a lot of effort on perf optimization. Performance is SotA for TF as far we're monitoring it.
1 reply 0 retweets 1 like -
Replying to @fchollet @PiotrTeterwak
My comment was based on a few experiences... 1) Poor performance and high memory usage in the Keras RNN cells shortly after the switch to TF2.0.
1 reply 0 retweets 0 likes -
2) Poor performance for 1x1 convolutions when batch_size=1 and CHW data layout. Should be calling GEMM under the hood but was using FFT kernel IIRC. You can see our workaround:https://github.com/tensorflow/tpu/blob/master/models/official/efficientnet/utils.py#L371 …
2 replies 0 retweets 2 likes -
3) A strange experience where ReLU kernels were being called from somewhere in a Keras layer when we weren't using ReLU (results were correct). This was fixed already IIRC
2 replies 0 retweets 1 like
Thanks for the feedback, we'll review it with the team. I expect most of these were already fixed. There were known performance issues in 2.0 but they were generally fixed by 2.1
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.