can you provide the training code?
GuideWsp opened this issue · comments
I am also confused about code training. Could you tell me how to optimize parameter U in code ? If you can provide one little demo about this,I will be very grateful. @d-li14
I am also confused about code training. Could you tell me how to optimize parameter U in code ? If you can provide one little demo about this,I will be very grateful. @d-li14
I have train the model!
I am also confused about code training. Could you tell me how to optimize parameter U in code ? If you can provide one little demo about this,I will be very grateful. @d-li14
I have train the model!
Hi, did you train the model?
I am also confused about code training. Could you tell me how to optimize parameter U in code ? If you can provide one little demo about this,I will be very grateful. @d-li14
I have train the model!Hi, did you train the model?
Yes, i have implemented the training processing in my github repo. https://github.com/longxianlei/G-ResNeXt_GroupNet/blob/e302de45ae8ba9f89484b01e590d38bc7ef882a2/dgconv.py#L58
@SahadevPoudel Yes
The skeleton code should be like this:
def get_constraint(model):
count = 0
for name, param in model.named_parameters():
if 'C_gate' in name:
count += 2**(len(param)*2)
return count / b # b denotes a scale of complexity of the GConv layers in the entire network
...
def train(args):
...
output, regularizer = model(input)
constraint = get_constraint(model)
a = -0.02 if regularizer > constraint else 0
loss = criterion(output, target) * torch.pow(constraint / regularizer, a)
...
@GuideWsp has sent an e-mail to ask for the code, so I closed this issue before.