ujscjj / DPTNet

100 stars 23 forks source link

model parameters #2

Open yoonsanghyu opened 3 years ago

yoonsanghyu commented 3 years ago

I implemented DPTNet using shi's code. But I got 2.8M model size. how can i reduce model size to 2.69M?

ujscjj commented 3 years ago

I just updated the code, you can try it again.

tky823 commented 3 years ago

Hi, thank you for sharing your codes.

I got 2.632M (2,631,680) model size using your code. Do the hyperparameters match the configuration in the paper? In the paper, the model size is 2.69M.

tky823 commented 3 years ago

Using the following script, I got different values: 2.835M (2,834,945) thop library may miss some trainable parameters.

# dpt_net.py
def main():
    model = DPTNet_base(enc_dim=256, feature_dim=64, hidden_dim=128, layer=6, segment_size=250, nspk=2, win_len=2)

    params = 0
    for p in model.parameters():
        if p.requires_grad:
            params += p.numel()
    print(params)
ujscjj commented 3 years ago

Sorry for responding later. The hyperparameters match the configuration in the paper. On my machine, the model size is 2.69MB.