shanyi15-patch-2
qiaolongfei 8 years ago
parent c74797a856
commit 205cadf6b7

@ -1,6 +1,6 @@
## how to use timeline tool to do profile ## how to use timeline tool to do profile
1. Add `with profiler.profiler(...)` to the main training loop. After run, the code will generate a profile record file `/tmp/profile`. **Warning**: Please do not run too many batches when use profiler to record timeline infomation, for the profile record will grow with the batch number. 1. Add `with profiler.profiler(...)` to the main training loop. After run, the code will generate a profile record file `/tmp/profile`. **Warning**: Please do not run too many batches when use profiler to record timeline information, for the profile record will grow with the batch number.
```python ```python
with profiler.profiler('All', 'total', '/tmp/profile') as prof: with profiler.profiler('All', 'total', '/tmp/profile') as prof:

Loading…
Cancel
Save