8.1.1.7.1.1.2.8. blueoil.networks.classification.resnet

8.1.1.7.1.1.2.8.1. Module Contents

8.1.1.7.1.1.2.8.1.1. Classes

Resnet

base network for classification

class blueoil.networks.classification.resnet.Resnet(optimizer_class=tf.compat.v1.train.GradientDescentOptimizer, optimizer_kwargs={}, learning_rate_func=None, learning_rate_kwargs={}, classes=[], is_debug=False, image_size=[448, 448], batch_size=64, weight_decay_rate=0.0001, num_residual=18)

Bases: blueoil.networks.classification.base.Base

base network for classification

This base network is for classification. Every classification’s network class should extend this class.

version =
_residual(self, inputs, in_filters, out_filters, strides, is_training)
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

loss(self, softmax, labels)

loss.

Parameters
  • output – softmaxed tensor from base. shape is (batch_num, num_classes)

  • labels – onehot labels tensor. shape is (batch_num, num_classes)

_decay(self)

L2 weight decay loss.