print(noobj_mask.shape): torch.Size([6, 3, 40, 40])
print(masks.shape): torch.Size([6, 256, 256])
print(nG): 40

print(noobj_mask.shape): torch.Size([6, 3, 10, 10])
print(masks.shape): torch.Size([6, 256, 256])
print(nG): 10

It looks like it’s failing to print masks interestingly.