Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ set_value
Method
set_value
imperative/python/megengine/tensor.py:191–192 ·
view source on GitHub ↗
(self, value)
Source
from the content-addressed store, hash-verified
189
version=
"1.0"
, reason=
"please use ``tensor_name[...] = value``"
,
190
)
191
def
set_value(self, value):
192
self._reset(value)
193
194
@deprecated(version=
"1.0"
, reason=
"use ``*= 0`` instead"
)
195
def
reset_zero(self):
Callers
2
test_modify_params
Function · 0.45
set
Method · 0.45
Calls
1
_reset
Method · 0.95
Tested by
1
test_modify_params
Function · 0.36