帝国理工大学学生的新发明,让歪果仁学汉语声调不再愁!

class paddle.vision.models. ShuffleNetV2 ( scale: float = 1.0, act: _ActivationType | None = 'relu', num_classes: int = 1000, with_pool: bool = True ) [source]
百度 “分时租赁在我国尚处于发展阶段,行业发展尚不成熟,加之涉及多方服务主体,普通消费者难以区分,很多不法分子钻了这一漏洞,借分时度假名义诈骗钱财,消费者尤其要注意辨别。

ShuffleNetV2 model from “ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design”.

Parameters
  • scale (float, optional) – Scale of output channels. Default: True.

  • act (str, optional) – Activation function of neural network. Default: “relu”.

  • num_classes (int, optional) – Output dim of last fc layer. If num_classes <= 0, last fc layer will not be defined. Default: 1000.

  • with_pool (bool, optional) – Use pool before the last fc layer or not. Default: True.

Returns

Layer. An instance of ShuffleNetV2 model.

Examples

>>> import paddle
>>> from paddle.vision.models import ShuffleNetV2

>>> shufflenet_v2_swish = ShuffleNetV2(scale=1.0, act="swish")
>>> x = paddle.rand([1, 3, 224, 224])
>>> out = shufflenet_v2_swish(x)
>>> print(out.shape)
[1, 1000]
forward ( inputs: Tensor ) Tensor

forward?

Defines the computation performed at every call. Should be overridden by all subclasses.

Parameters
  • *inputs (tuple) – unpacked tuple arguments

  • **kwargs (dict) – unpacked dict arguments