SqueezeNet

class paddle.vision.models. SqueezeNet ( version, num_classes=1000, with_pool=True ) [source]

SqueezeNet model from “SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size”

Parameters
  • version (str) – version of squeezenet, which can be “1.0” or “1.1”.

  • num_classes (int) – output dim of last fc layer. Default: 1000.

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

Examples

System Message: ERROR/3 (/usr/local/lib/python3.8/site-packages/paddle/vision/models/squeezenet.py:docstring of paddle.vision.models.squeezenet.SqueezeNet, line 14)

Error in “code-block” directive: maximum 1 argument(s) allowed, 7 supplied.

.. code-block:: python
    import paddle
    from paddle.vision.models import SqueezeNet

    # build v1.0 model
    model = SqueezeNet(version='1.0')

    # build v1.1 model
    # model = SqueezeNet(version='1.1')

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

    print(out.shape)

forward ( inputs )

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