Not with batch norm. If I understood your implementation correctly, layers with batch normalization are just skipped:
_supported_layers = ['Linear', 'Conv2d']

if layer_type not in _supported_layers:
    continue

Which means that for batch normalization layer (which is trainable), grad1 will not be created.