Browse Source

modify example of WithBNNLossCell

tags/v1.1.0
bingyaweng 5 years ago
parent
commit
3fb3e026b0
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