There is a large literature on this. The math can get messy trying to change more than one thing at a time.
Imho a more flexible and effective way to deep learn delta hedging is to conduct experiments using simulation techniques where the hedging interval is a parameter. Simulate price paths for your favourite option underlying per the convenient world of theory and prove to yourself that a delta-hedged option position on average earns zero profit. You can see what happens in the theoretical world case when you shorten the hedge interval. Then start introducing the inconveniences of reality (e.g. transactions costs, market trending, stochastic vol, etc.) and see what happens.
The guts of a simulation engine for delta hedging (with at least one obvious error) can be found at
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=991344. Someone else can probably suggest a cleaner reference,. You'll want to output the standard deviation of the hedge error as well, for example.