Your code snippet is unfortunately not executable, but using random inputs shows that the frozen parameters are not updated:
# freeze some layers and store reference params
net = deeplab_v3_separation_dev()
ref_params_freeze = []
ref_params_update = []
i=0
for param in net.parameters():
    if i<340 :
        param.requires_grad = False
        ref_params_freeze.append(param.clone())
    else:
        ref_params_update.append(param.clone())
    i+=1 
    

# setup
optimizer = torch.optim.Adam(net.parameters(), lr=1e-3, betas=(0.7, 0.999), eps=1e-08, weight_decay=1e-3, amsgrad=False)
scheduler = torch.optim.lr_scheduler.StepLR(optimizer,  step_size=5, gamma=(0.3))
L1_criterion = nn.L1Loss(reduction='none')    
semantic_criterion = nn.BCELoss(reduction='none')#BCEWithLogitsLoss

net.train()

mixedImgs = torch.randn(2, 3 ,224, 224)
BackgtoundSemantics = torch.randint(0, 2, (2, 21, 224, 224)).float()
BackgroundImage = torch.randint(0, 2, (2, 3, 224, 224)).float()
ReflectionImage = torch.randint(0, 2, (2, 3, 224, 224)).float()

# updates
semantic_pred, BG_img_pred, R_img_pred = net(mixedImgs)
loss1 = semantic_criterion(semantic_pred,BackgtoundSemantics)
var1 = torch.var(loss1)
loss2 =  L1_criterion(BG_img_pred, BackgroundImage)
loss3 = 0. # undefined class

loss4 = 0.8*L1_criterion(R_img_pred,ReflectionImage)
var2 = torch.var(loss4)
Loss1 = loss1/(2*var1.square())
Loss2 = (loss2+loss3+loss4) /(2*var2.square()) 
loss = 0*torch.mean(Loss2)+0*torch.mean(Loss1)

# step
optimizer.zero_grad()
loss.backward()
nn.utils.clip_grad_value_(net.parameters(), 0.1)
optimizer.step()

# check param updates
i = 0
for param in net.parameters():
    if i < 340:
        print('frozen param abs().max() err {}'.format(
            (ref_params_freeze[i] - param).abs().max()))
    else:
        print('trainable param abs().max() err {}'.format(
            (ref_params_update[i-340] - param).abs().max()))
    i += 1