PotatoTian/TPGM

`torch.nn.DataParallel` changes name of parameters

Closed this issue · 1 comments

exclude_list=["head.weight","head.bias"]

Hi,
in line

model = torch.nn.DataParallel(model, device_ids=range(torch.cuda.device_count()))
,

will change the name of the parameters from head.bias to module.head.bias. As a result, TPGM parameters will also be learned for final layer's weight and biases? Is this intentional?

Hi,

Thanks for pointing this out. This is not intentional. The head weights are supposed to be excluded from training. Please change to the exclude_list=["module.head.weight", "module.head.bias"] because they are randomly initalized. I will also update it shortly.

Best,