8.1.1.7.1.1.2.2. blueoil.networks.classification.darknet

8.1.1.7.1.1.2.2.1. Module Contents

8.1.1.7.1.1.2.2.1.1. Classes

Darknet

Darknet 19 layer

DarknetQuantize

Quantize Darknet Network.

class blueoil.networks.classification.darknet.Darknet(*args, **kwargs)

Bases: blueoil.networks.classification.base.Base

Darknet 19 layer

base(self, images, is_training)

Base function contains inference.

Parameters
  • images – Input images.

  • is_training – A flag for if is training.

Returns

Inference result.

Return type

tf.Tensor

class blueoil.networks.classification.darknet.DarknetQuantize(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.classification.darknet.Darknet

Quantize Darknet Network.

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
  • weight_quantization – Callable object which quantize variable.

  • quantize_first_convolution (bool) – Use quantization in first conv.

  • quantize_last_convolution (bool) – Use quantization in last conv.

  • getter – Default from tensorflow.

  • name – Default from tensorflow.

  • args – Args.

  • kwargs – Kwargs.

base(self, images, is_training)

Base function contains inference.

Parameters
  • images – Input images.

  • is_training – A flag for if is training.

Returns

Inference result.

Return type

tf.Tensor