mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 00:06:58 +08:00
Fix lint error with Black
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
|
|
||||||
|
|
||||||
def count_parameters(models_or_parameters, unit="mb"):
|
def count_parameters(models_or_parameters, unit="mb"):
|
||||||
if isinstance(models_or_parameters, nn.Module):
|
if isinstance(models_or_parameters, nn.Module):
|
||||||
counts = sum(v.numel() for v in models_or_parameters.parameters())
|
counts = sum(v.numel() for v in models_or_parameters.parameters())
|
||||||
|
|||||||
Reference in New Issue
Block a user