Update LFNA test

This commit is contained in:
D-X-Y
2021-05-13 03:40:04 +00:00
parent 0b1ca45c44
commit ee5d8a8e21
2 changed files with 26 additions and 4 deletions

View File

@@ -75,6 +75,15 @@ class SuperModule(abc.ABC, nn.Module):
)
print(finalstr)
def numel(self, buffer=True):
total = 0
for name, param in self.named_parameters():
total += param.numel()
if buffer:
for name, buf in self.named_buffers():
total += buf.numel()
return total
@property
def abstract_search_space(self):
raise NotImplementedError