That seems to work fine for me:
import torch
from torch import nn

model = nn.Sequential(
    nn.Conv2d(in_channels=1024, out_channels=1024, kernel_size=1),
    nn.BatchNorm2d(1024, track_running_stats=False),
    nn.ReLU()
)

inp = torch.rand(1, 1024, 5, 5)

model(inp).sum().backward()