Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ forward
Method
forward
imperative/python/megengine/module/embedding.py:78–83 ·
view source on GitHub ↗
(self, inputs)
Source
from the content-addressed store, hash-verified
76
init.normal_(self.weight)
77
78
def
forward(self, inputs):
79
if
self.freeze:
80
weight = self.weight.detach()
81
else
:
82
weight = self.weight
83
return
embedding_func(inputs, weight)
84
85
@classmethod
86
def
from_pretrained(
Callers
nothing calls this directly
Calls
1
detach
Method · 0.45
Tested by
no test coverage detected