Browse Source

!9719 modify example of WithBNNLossCell

From: @bingyaweng
Reviewed-by: @sunnybeike,@zichun_ye
Signed-off-by: @sunnybeike
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
2441059642
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/nn/probability/bnn_layers/bnn_cell_wrapper.py

+ 2
- 2
mindspore/nn/probability/bnn_layers/bnn_cell_wrapper.py View File

@@ -46,8 +46,8 @@ class WithBNNLossCell(Cell):
>>> net_with_criterion = WithBNNLossCell(net, loss_fn)
>>>
>>> batch_size = 2
>>> data = Tensor(np.ones([batch_size, 3, 64, 64]).astype(np.float32) * 0.01)
>>> label = Tensor(np.ones([batch_size, 1, 1, 1]).astype(np.int32))
>>> data = Tensor(np.ones([batch_size, 16]).astype(np.float32) * 0.01)
>>> label = Tensor(np.ones([batch_size, 1]).astype(np.float32))
>>>
>>> net_with_criterion(data, label)
"""


Loading…
Cancel
Save