Skip to content

Instantly share code, notes, and snippets.

@weiaicunzai
Last active December 31, 2023 06:24
Show Gist options
  • Save weiaicunzai/86f943b161fcaf2547ce9e404dbb042a to your computer and use it in GitHub Desktop.
Save weiaicunzai/86f943b161fcaf2547ce9e404dbb042a to your computer and use it in GitHub Desktop.
using tensorflow Dataset api to do data_argument
import cProfile, pstats
from pstats import SortKey
sortby = SortKey.CUMULATIVE
with cProfile.Profile() as pr:
# your code here
ps = pstats.Stats(pr).sort_stats(sortby)
ps.print_stats()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment