rrm39:

I’m worried that the loss I get when training classifier B is getting backwarded to net A.


This would be the case if you pass the output of netA to netB directly since both models are treated as any other nn.Module (e.g. nn.Conv2d).
If you want to train netB alone without calculating the gradients in netA and updating its parameters, you can detach netA's output via:
out = netA(input)
out = netB(out.detach())
loss = criterion(out, target)
loss.backward() # will calculate the gradients in netB only