mindcv.models.layers

layers init

class mindcv.models.layers.Swish[源代码]

基类:Cell

Swish activation function: x * sigmoid(x).

参数

None

返回

Tensor

示例

>>> x = Tensor(((20, 16), (50, 50)), mindspore.float32)
>>> Swish()(x)
construct(x)[源代码]

Defines the computation to be performed. This method must be overridden by all subclasses.

备注

It is not supported currently that inputs contain both tuple and non-tuple types at same time.

参数
  • inputs (tuple) – Tuple of variable parameters.

  • kwargs (dict) – Dictionary of variable keyword parameters.

返回

Tensor, returns the computed result.