From 43e5f41c4b65924bb6566690287d2460f852883d Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Fri, 8 Apr 2022 16:42:26 +0800 Subject: [PATCH] docs(mgb/docs): add alternative interface for deprecated api GitOrigin-RevId: fdeaa5b64fed0f0bfbe7a0545d32454ab0952bb9 --- imperative/python/megengine/tensor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imperative/python/megengine/tensor.py b/imperative/python/megengine/tensor.py index 40432f5aa..080106dfb 100644 --- a/imperative/python/megengine/tensor.py +++ b/imperative/python/megengine/tensor.py @@ -197,7 +197,9 @@ class Tensor(_Tensor, ArrayMethodMixin): self._name = self._prefix + "." + name if self._prefix else name self._set_name(self._name) - @deprecated(version="1.0", reason="no need to reuse an existing tensor since 1.0") + @deprecated( + version="1.0", reason="please use ``tensor_name[...] = value``", + ) def set_value(self, value): self._reset(value) -- GitLab