Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ml-explore/mlx-examples
/ num_params
Method
num_params
cifar/resnet.py:92–94 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
90
return
nn.Sequential(*layers)
91
92
def
num_params(self):
93
nparams = sum(x.size
for
k, x in tree_flatten(self.parameters()))
94
return
nparams
95
96
def
__call__(self, x):
97
x = nn.relu(self.bn1(self.conv1(x)))
Callers
1
main
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected