8.1.1.7.1.1. blueoil.networks.classification

8.1.1.7.1.1.3. Package Contents

8.1.1.7.1.1.3.1. Classes

LmnetV0

Lmnet network for classification, version 0.

LmnetV0Quantize

Lmnet quantize network for classification, version 1.0

LmnetV1

Lmnet v1 for classification.

LmnetV1Quantize

Lmnet quantize network for classification, version 1.0

MobileNetV2

MobileNet v2

class blueoil.networks.classification.LmnetV0(*args, **kwargs)

Bases: blueoil.networks.classification.base.Base

Lmnet network for classification, version 0.

version = 0.01
_get_lmnet_block(self, is_training, channels_data_format)
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.LmnetV0Quantize(activation_quantizer=None, activation_quantizer_kwargs={}, weight_quantizer=None, weight_quantizer_kwargs={}, *args, **kwargs)

Bases: blueoil.networks.classification.lmnet_v0.LmnetV0

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.

class blueoil.networks.classification.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.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.

class blueoil.networks.classification.MobileNetV2(dropout_keep_prob=0.8, batch_norm_decay=0.997, stddev=0.09, *args, **kwargs)

Bases: blueoil.networks.classification.base.Base

MobileNet v2

version = 1.0
_inverted_bottleneck(self, x, up_sample_rate, channels, subsample)
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

blueoil.networks.classification.Lmnet
blueoil.networks.classification.LmnetQuantize