Skip to content

Instantly share code, notes, and snippets.

@maciejskorski
Created December 18, 2020 21:33
Show Gist options
  • Save maciejskorski/6fb8b066145ebef53d85adb99db8a9b2 to your computer and use it in GitHub Desktop.
Save maciejskorski/6fb8b066145ebef53d85adb99db8a9b2 to your computer and use it in GitHub Desktop.
profiling custom blocks of TF code
# wrap the TF code to be profiled with <start> and <stop> methods as below
tf.profiler.experimental.start('logs/profile')
for (x,y) in data:
train_step(x,y)
tf.profiler.experimental.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment