8.1.1.7.1.1.2.5. blueoil.networks.classification.lmnet_v1

8.1.1.7.1.1.2.5.1. Module Contents

8.1.1.7.1.1.2.5.1.1. Classes

LmnetV1

Lmnet v1 for classification.

LmnetV1Quantize

Lmnet quantize network for classification, version 1.0

class blueoil.networks.classification.lmnet_v1.LmnetV1(*args, **kwargs)

Bases: blueoil.networks.classification.base.Base

Lmnet v1 for classification.

version = 1.0
_get_lmnet_block(self, is_training, channels_data_format)
_space_to_depth(self, inputs=None, block_size=2, name='')
base(self, images, is_training, *args, **kwargs)

Base network.

Parameters
  • images – Input images.

  • is_training – A flag for if is training.

Returns

Inference result.

Return type

tf.Tensor

class blueoil.networks.classification.lmnet_v1.LmnetV1Quantize(activation_quantizer=None, activation_quantizer_kwargs={}, weight_quantizer=None, weight_quantizer_kwargs={}, *args, **kwargs)

Bases: blueoil.networks.classification.lmnet_v1.LmnetV1

Lmnet quantize network for classification, version 1.0

Following args are used for inference: activation_quantizer, activation_quantizer_kwargs, weight_quantizer, weight_quantizer_kwargs.

Parameters
  • activation_quantizer (callable) – Weight quantizater. See more at blueoil.quantizations.

  • activation_quantizer_kwargs (dict) – Kwargs for activation_quantizer.

  • weight_quantizer (callable) – Activation quantizater. See more at blueoil.quantizations.

  • weight_quantizer_kwargs (dict) – Kwargs for weight_quantizer.

version = 1.0
static _quantized_variable_getter(getter, name, weight_quantization=None, *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.