Merge pull request !38197 from VectorSL/fix-doc
This commit is contained in:
i-robot 2022-07-18 02:36:48 +00:00 committed by Gitee
commit 5188d322b8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 0 deletions

View File

@ -176,6 +176,8 @@ class BufferAppend(PrimitiveWithInfer):
>>> capacity = 100
>>> count = Parameter(Tensor(5, ms.int32), name="count")
>>> head = Parameter(Tensor(0, ms.int32), name="head")
>>> shapes = [(4,), (2,), (1,), (4,)]
>>> types = [ms.float32, ms.int32, ms.int32, ms.float32]
>>> buffer = [Parameter(Tensor(np.arange(100 * 4).reshape(100, 4).astype(np.float32)), name="states"),
... Parameter(Tensor(np.arange(100 * 2).reshape(100, 2).astype(np.int32)), name="action"),
... Parameter(Tensor(np.ones((100, 1)).astype(np.int32)), name="reward"),
@ -273,6 +275,8 @@ class BufferGetItem(PrimitiveWithInfer):
>>> index = 3
>>> count = Parameter(Tensor(5, ms.int32), name="count")
>>> head = Parameter(Tensor(0, ms.int32), name="head")
>>> shapes = [(4,), (2,), (1,), (4,)]
>>> types = [ms.float32, ms.int32, ms.int32, ms.float32]
>>> buffer = [Parameter(Tensor(np.arange(100 * 4).reshape(100, 4).astype(np.float32)), name="states"),
... Parameter(Tensor(np.arange(100 * 2).reshape(100, 2).astype(np.int32)), name="action"),
... Parameter(Tensor(np.ones((100, 1)).astype(np.int32)), name="reward"),