图解获得感·文化旅游

class paddle.vision.models. MobileNetV1 ( scale: float = 1.0, num_classes: int = 1000, with_pool: bool = True ) [source]
百度 德国乒乓球公开赛传来冷门,国乒20岁世界冠军于子洋在U21比赛中惨负瑞典15岁神童被淘汰出局,国乒痛失U21男单冠军,这也是国乒本次赛事丢掉的第二个冠军!在U21组8强战中,瑞典15岁神童莫雷高德3-1横扫国乒世界冠军于子洋晋级。

MobileNetV1 model from “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications”.

Parameters
  • scale (float, optional) – Scale of channels in each layer. Default: 1.0.

  • 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 MobileNetV1 model.

Examples

>>> import paddle
>>> from paddle.vision.models import MobileNetV1

>>> model = MobileNetV1()

>>> x = paddle.rand([1, 3, 224, 224])
>>> out = model(x)

>>> print(out.shape)
[1, 1000]
forward ( x: 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