Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ __init__
Method
__init__
imperative/python/test/unit/utils/test_module_stats.py:110–112 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
108
def
test_tm_get_weights():
109
class
Net(M.Module):
110
def
__init__(self):
111
super().__init__()
112
self.weight = mge.tensor(np.random.randn(3, 3))
113
114
def
forward(self, x):
115
return
x * self.weight
Callers
7
__init__
Method · 0.45
__init__
Method · 0.45
__init__
Method · 0.45
__init__
Method · 0.45
__init__
Method · 0.45
__init__
Method · 0.45
__init__
Method · 0.45
Calls
1
tensor
Method · 0.80
Tested by
no test coverage detected