You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can split Trimap and Matting networks by freezing each, and use requires_grad = False in train.py
For instance, after loading the model :
# depending on the training phase, freeze model part
if args.train_phase == 't_net':
for name, child in model.named_children():
if name is 'm_net':
child.requires_grad = False
if args.train_phase == 'm_net':
for name, child in model.named_children():
if name is 'm_net':
child.requires_grad = False
also, you can change the loss to focus on each part of the network
if args.train_phase == 't_net':
loss = L_t
if args.train_phase == 'm_net':
loss = L_p
if args.train_phase == 'end_to_end':
loss = L_p + 0.01*L_t
loss_t grows when training M-net?
The text was updated successfully, but these errors were encountered: