Browse Source

!8368 modify_guide_for_website

From: @Somnus2020
Reviewed-by: @kingxian,@zhunaipan
Signed-off-by: @kingxian
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
821c6e5f03
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      mindspore/nn/layer/basic.py

+ 4
- 4
mindspore/nn/layer/basic.py View File

@@ -538,11 +538,11 @@ class Unfold(Cell):
and the shape is [out_batch, out_depth, out_row, out_col], the out_batch is the same as the in_batch.

Examples:
>>> net = Unfold(ksizes=[1, 2, 2, 1], strides=[1, 1, 1, 1], rates=[1, 1, 1, 1])
>>> image = Tensor(np.ones([1, 1, 3, 3]), dtype=mstype.float16)
>>> net = Unfold(ksizes=[1, 2, 2, 1], strides=[1, 2, 2, 1], rates=[1, 2, 2, 1])
>>> image = Tensor(np.ones([2, 3, 6, 6]), dtype=mstype.float16)
>>> net(image)
Tensor ([[[[1, 1] [1, 1]] [[1, 1], [1, 1]] [[1, 1] [1, 1]], [[1, 1], [1, 1]]]],
shape=(1, 4, 2, 2), dtype=mstype.float16)
Tensor ([[[[1, 1] [1, 1]] [[1, 1], [1, 1]] [[1, 1] [1, 1]], [[1, 1] [1, 1]], [[1, 1] [1, 1]],
[[1, 1], [1, 1]]]], shape=(2, 12, 2, 2), dtype=mstype.float16)
"""

def __init__(self, ksizes, strides, rates, padding="valid"):


Loading…
Cancel
Save