Shortcuts

shufflenet_v2_x0_5

torchvision.models.quantization.shufflenet_v2_x0_5(*, weights: Optional[Union[ShuffleNet_V2_X0_5_QuantizedWeights, ShuffleNet_V2_X0_5_Weights]] = None, progress: bool = True, quantize: bool = False, **kwargs: Any) QuantizableShuffleNetV2[source]

Constructs a ShuffleNetV2 with 0.5x output channels, as described in ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design.

Note

Note that quantize = True returns a quantized model with 8 bit weights. Quantized models only support inference and run on CPUs. GPU inference is not yet supported.

Parameters:
  • weights (ShuffleNet_V2_X0_5_QuantizedWeights or ShuffleNet_V2_X0_5_Weights, optional) – The pretrained weights for the model. See ShuffleNet_V2_X0_5_QuantizedWeights below for more details, and possible values. By default, no pre-trained weights are used.

  • progress (bool, optional) – If True, displays a progress bar of the download to stderr. Default is True.

  • quantize (bool, optional) – If True, return a quantized version of the model. Default is False.

  • **kwargs – parameters passed to the torchvision.models.quantization.ShuffleNet_V2_X0_5_QuantizedWeights base class. Please refer to the source code for more details about this class.

class torchvision.models.quantization.ShuffleNet_V2_X0_5_QuantizedWeights(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
class torchvision.models.ShuffleNet_V2_X0_5_Weights(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources