flair icon indicating copy to clipboard operation
flair copied to clipboard

How to get the total number of parameters for FLAIR models

Open kaliaanup opened this issue 2 years ago • 1 comments

the model.summary() does not work which could be obvious since FLAIR has its own model. The print(model) works however it prints the model layers without giving a summary. Can anyone enable this or a way to find it out?

kaliaanup avatar May 26 '22 15:05 kaliaanup

Hi @kaliaanup , you could try to use this solution:

for name, param in model.named_parameters():
  if param.requires_grad:
    print(name, param.numel())

stefan-it avatar Jun 10 '22 21:06 stefan-it

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 15 '22 21:10 stale[bot]