8.1.1.7.1.3.1.4. blueoil.networks.object_detection.yolo_v2_quantize

8.1.1.7.1.3.1.4.1. Module Contents

8.1.1.7.1.3.1.4.1.1. Classes

YoloV2Quantize

Quantize YOLOv2 Network.

class blueoil.networks.object_detection.yolo_v2_quantize.YoloV2Quantize(quantize_first_convolution=True, quantize_last_convolution=True, activation_quantizer=None, activation_quantizer_kwargs={}, weight_quantizer=None, weight_quantizer_kwargs={}, *args, **kwargs)

Bases: blueoil.networks.object_detection.yolo_v2.YoloV2

Quantize YOLOv2 Network.

It is based on original YOLO v2.

static _quantized_variable_getter(weight_quantization, quantize_first_convolution, quantize_last_convolution, getter, name, *args, **kwargs)

Get the quantized variables.

Use if to choose or skip the target should be quantized.

Parameters
  • getter – Default from tensorflow.

  • name – Default from tensorflow.

  • weight_quantization – Callable object which quantize variable.

  • args – Args.

  • kwargs – Kwargs.

base(self, images, is_training)

Base network.

Returns: Output. output shape depends on parameter.

When data_format is NHWC shape is [

batch_size, num_cell[0], num_cell[1], (num_classes + 5(x, y ,w, h, confidence)) * boxes_per_cell(length of anchors),

]

When data_format is NCHW shape is [

batch_size, (num_classes + 5(x, y ,w, h, confidence)) * boxes_per_cell(length of anchors), num_cell[0], num_cell[1],

]