Skip to content

Commit

Permalink
Number of parameters must be an integer
Browse files Browse the repository at this point in the history
Signed-off-by: Joao Lucas de Sousa Almeida <[email protected]>
  • Loading branch information
Joao-L-S-Almeida committed May 24, 2023
1 parent dc7c1a5 commit 07c7419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simulai/templates/_pytorch_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def weights_l1(self) -> torch.Tensor:
def n_parameters(self):

try:
return sum([np.prod(tuple(param.shape)) for param in
self.parameters()])
return int(sum([np.prod(tuple(param.shape)) for param in
self.parameters()]))

except Exception:

Expand Down

0 comments on commit 07c7419

Please sign in to comment.