8.1.1.7.1.1.2.9. blueoil.networks.classification.vgg16

8.1.1.7.1.1.2.9.1. Module Contents

8.1.1.7.1.1.2.9.1.1. Classes

Vgg16Network

Base network.

blueoil.networks.classification.vgg16.VGG_MEAN = [103.939, 116.779, 123.68]
class blueoil.networks.classification.vgg16.Vgg16Network(num_classes, optimizer_class, optimizer_args, is_debug=False)

Bases: blueoil.networks.base.BaseNetwork

Base network.

This base network is for every task, such as classification, object detection and segmentation. Every sub task’s base network class should extend this class.

Parameters
  • is_debug (boolean) – Set True to use debug mode. It will summary some histograms, use small dataset and step size.

  • optimizer_class (class) – Optimizer using for training.

  • optimizer_kwargs (dict) – For init optimizer.

  • learning_rate_func (callable) – Use for changing learning rate. Such as learning rate decay, tf.train.piecewise_constant.

  • learning_rate_kwargs (dict) – For learning rate function. For example of tf.train.piecewise_constant, {“values”: [5e-5, 1e-5, 5e-6, 1e-6, 5e-7], “boundaries”: [20000, 40000, 60000, 80000]}.

  • classes (list | tuple) – Classes names list.

  • image_size (list | tuple) – Image size.

  • batch_size (list | tuple) – Batch size.

build(self, images, is_training)
conv_layer(self, name, inputs, filters, kernel_size, strides=1, padding='SAME', activation=tf.nn.sigmoid, *args, **kwargs)
fc_layer(self, name, inputs, filters, *args, **kwargs)
convert_rbg_to_bgr(self, rgb_images)