Hi,
What do you mean by “layer by layer”? Do you mean the layers from nn ? Or each operation that is performed?
An easy way to do this could be to add Tensor hooks to all the points where you want to stop and you can fire pdb debug in the hook. Or do what you want to do.