Layer

Table of Layers

Data

List Brief
DataLayer The implementation of DataLayer.
MemoryDataLayer The implementation of MemoryDataLayer.

Vision

List Brief
ConvolutionLayer The implementation of ConvolutionLayer.
DepthwiseConvolutionLayer The implementation of DepthwiseConvolutionLayer.
DeconvolutionLayer The implementation of DeconvolutionLayer.
PoolingLayer The implementation of PoolingLayer.
ROIPoolingLayer The implementation of ROIPoolingLayer.
ROIAlignLayer The implementation of ROIAlignLayer.
LRNLayer The implementation of LRNLayer.
NNResizeLayer The implementation of NNResizeLayer.
BilinearResizeLayer The implementation of BilinearResizeLayer.
DropBlockLayer The implementation of DropBlockLayer.

Neuron

List Brief
ReLULayer The implementation of ReLULayer.
PReLULayer The implementation of PReLULayer.
ELULayer The implementation of ELULayer.
SELULayer The implementation of SELULayer.
SigmoidLayer The implementation of SigmoidLayer.
TanHLayer The implementation of TanHLayer.
DropoutLayer The implementation of DropoutLayer.
PowerLayer The implementation of PowerLayer.

Common

List Brief
InnerProductLayer The implementation of InnerProductLayer.
AccuracyLayer The implementation of AccuracyLayer.
PythonLayer The implementation of PythonLayer.
EltwiseLayer The implementation of EltwiseLayer
AddLayer The extended implementation of EltwiseLayer.
ConcatLayer The implementation of ConcatLayer.
SliceLayer The implementation of SliceLayer.
CropLayer The implementation of CropLayer.
ReshapeLayer The implementation of ReshapeLayer.
PermuteLayer The implementation of PermuteLayer.
FlattenLayer The implementation of FlattenLayer.
GatherLayer The extended implementation for GatherOp.
SoftmaxLayer The implementation of SoftmaxLayer.
ArgMaxLayer The implementation of ArgMaxLayer.
BatchNormLayer The implementation of BatchNormLayer.
GroupNormLayer The implementation of GroupNormLayer.
ScaleLayer The implementation of ScaleLayer.
BNLayer The implementation of BNLayer.
GNLayer The implementation of GNLayer.
NormalizeLayer The implementation of NormalizeLayer.
TileLayer The extended implementation of TileLayer.
ExpandDimsLayer The implementation of ExpandDimsLayer.
StopGradientLayer The implementation of StopGradientLayer.
ProposalLayer The implementation of ProposalLayer.

Loss

List Brief
SoftmaxWithLossLayer The implementation of SoftmaxWithLossLayer.
SigmoidCrossEntropyLossLayer The implementation of SigmoidCrossEntropyLossLayer.
L2LossLayer The implementation of L2LossLayer.
SmoothL1LossLayer The implementation of SmoothL1LossLayer.
SigmoidWithFocalLossLayer The implementation of SigmoidWithFocalLossLayer.
SoftmaxWithFocalLossLayer The implementation of SoftmaxWithFocalLossLayer.

MPI

List Brief
MPIBroadcastLayer The implementation of MPIBroadcastLayer
MPIGatherLayer The implementation of MPIGatherLayer

Quick Reference

List Brief
Layer.Setup Setup the parameters.
Layer.Fill Register the fillers.

API Reference

class dragon.vm.caffe.layer.Layer(LayerParameter)

Layer is the basic structure for parsing text format definition.

We further extent it with MPI and memory optimization utilities.

__init__(LayerParameter)

Construct a Layer.

Parameters:LayerParameter (LayerParameter) – The parameter of Layer.
Returns:The layer.
Return type:Layer

The Implementation of the data layers.

class dragon.vm.caffe.layers.data.DataLayer(LayerParameter)

The implementation of DataLayer.

Different from caffe, we force to use LMDB backend.

Parameters:
class dragon.vm.caffe.layers.data.MemoryDataLayer(LayerParameter)

The implementation of MemoryDataLayer.

We extend it with float16 and NHWC => NCHW.

Parameters:

The Implementation of the vision layers.

class dragon.vm.caffe.layers.vision.ConvolutionLayer(LayerParameter)

The implementation of ConvolutionLayer.

Parameters:
class dragon.vm.caffe.layers.vision.DepthwiseConvolutionLayer(LayerParameter)

The implementation of DepthwiseConvolutionLayer.

Parameters:
class dragon.vm.caffe.layers.vision.DeconvolutionLayer(LayerParameter)

The implementation of DeconvolutionLayer.

Parameters:
class dragon.vm.caffe.layers.vision.PoolingLayer(LayerParameter)

The implementation of PoolingLayer.

Parameters:
class dragon.vm.caffe.layers.vision.ROIPoolingLayer(LayerParameter)

The implementation of ROIPoolingLayer.

Parameters:
class dragon.vm.caffe.layers.vision.ROIAlignLayer(LayerParameter)

The implementation of ROIAlignLayer.

Parameters:
class dragon.vm.caffe.layers.vision.LRNLayer(LayerParameter)

The implementation of LRNLayer.

Parameters:
class dragon.vm.caffe.layers.vision.NNResizeLayer(LayerParameter)

The implementation of NNResizeLayer.

Parameters:
class dragon.vm.caffe.layers.vision.BilinearResizeLayer(LayerParameter)

The implementation of BilinearResizeLayer.

Parameters:
class dragon.vm.caffe.layers.vision.DropBlockLayer(LayerParameter)

The implementation of DropBlock2dLayer.

Parameters:
  • block_size (int) – The size of dropping block. Refer DropBlockParameter.block_size.
  • keep_prob (float) – The prob of keeping. Refer DropBlockParameter.keep_prob.
  • alpha (float) – The scale factor to gamma. Refer DropBlockParameter.alpha.
  • decrement (float) – The decrement to keep prob. Refer DropBlockParameter.decrement.

The Implementation of the neuron layers.

class dragon.vm.caffe.layers.neuron.ReLULayer(LayerParameter)

The implementation of ReLULayer.

Parameters:negative_slope (float) – The slope of negative side. Refer ReLUParameter.negative_slope.
class dragon.vm.caffe.layers.neuron.PReLULayer(LayerParameter)

The implementation of PReLULayer.

Parameters:
class dragon.vm.caffe.layers.neuron.ELULayer(LayerParameter)

The implementation of ELULayer.

Parameters:alpha (float) – The alpha. Refer ELUParameter.alpha.
class dragon.vm.caffe.layers.neuron.SELULayer(LayerParameter)

The implementation of SELULayer.

class dragon.vm.caffe.layers.neuron.SigmoidLayer(LayerParameter)

The implementation of SigmoidLayer.

class dragon.vm.caffe.layers.neuron.TanHLayer(LayerParameter)

The implementation of TanHLayer.

class dragon.vm.caffe.layers.neuron.DropoutLayer(LayerParameter)

The implementation of DropoutLayer.

Parameters:
class dragon.vm.caffe.layers.neuron.PowerLayer(LayerParameter)

The implementation of PowerLayer.

Parameters:

The Implementation of the common layers.

class dragon.vm.caffe.layers.common.InnerProductLayer(LayerParameter)

The implementation of InnerProductLayer.

Parameters:
class dragon.vm.caffe.layers.common.AccuracyLayer(LayerParameter)

The implementation of AccuracyLayer.

Parameters:
class dragon.vm.caffe.layers.common.PythonLayer(LayerParameter)

The implementation of PythonLayer.

Parameters:
class dragon.vm.caffe.layers.common.EltwiseLayer(LayerParameter)

The implementation of EltwiseLayer.

Parameters:
class dragon.vm.caffe.layers.common.AddLayer(LayerParameter)

The extended implementation of EltwiseLayer.

class dragon.vm.caffe.layers.common.ConcatLayer(LayerParameter)

The implementation of ConcatLayer.

Parameters:axis (int) – The axis to concatenate. Refer ConcatParameter.axis.
class dragon.vm.caffe.layers.common.SliceLayer(LayerParameter)

The implementation of SliceLayer.

Parameters:
  • axis (int) – The axis to concatenate. Refer SliceParameter.axis.
  • slice_point (sequence of int) – The optional slice points. Refer SliceParameter.slice_point.
class dragon.vm.caffe.layers.common.CropLayer(LayerParameter)

The implementation of CropLayer.

Parameters:
class dragon.vm.caffe.layers.common.ReshapeLayer(LayerParameter)

The implementation of ReshapeLayer.

Parameters:shape (sequence of int) – The output shape. Refer ReshapeParameter.shape.
class dragon.vm.caffe.layers.common.PermuteLayer(LayerParameter)

The implementation of PermuteLayer.

Parameters:order (sequence of int) – The permutation. Refer PermuteParameter.order.
class dragon.vm.caffe.layers.common.FlattenLayer(LayerParameter)

The implementation of FlattenLayer.

Parameters:
class dragon.vm.caffe.layers.common.SoftmaxLayer(LayerParameter)

The implementation of SoftmaxLayer.

Parameters:axis (int) – The axis to perform softmax. Refer SoftmaxParameter.axis.
class dragon.vm.caffe.layers.common.ArgMaxLayer(LayerParameter)

The implementation of ArgMaxLayer.

Parameters:
class dragon.vm.caffe.layers.common.BatchNormLayer(LayerParameter)

The implementation of BatchNormLayer.

Parameters:
class dragon.vm.caffe.layers.common.GroupNormLayer(LayerParameter)

The implementation of GroupNormLayer.

Parameters:
  • group (int) – Refer GroupNormParameter.group.
  • eps (float) – Refer GroupNormParameter.eps.
class dragon.vm.caffe.layers.common.ScaleLayer(LayerParameter)

The implementation of ScaleLayer.

Parameters:
class dragon.vm.caffe.layers.common.BNLayer(LayerParameter)

The implementation of BNLayer.

Parameters:
class dragon.vm.caffe.layers.common.GNLayer(LayerParameter)

The implementation of GNLayer.

Parameters:
  • group (int) – Refer GroupNormParameter.group.
  • eps (float) – Refer GroupNormParameter.eps.
  • filler (FillerParameter) – The filler of scale parameter. Refer ScaleParameter.filler.
  • bias_filler (FillerParameter) – The filler of bias parameter. Refer ScaleParameter.bias_filler.
class dragon.vm.caffe.layers.common.NormalizeLayer(LayerParameter)

The implementation of NormalizeLayer.

Parameters:
class dragon.vm.caffe.layers.common.TileLayer(LayerParameter)

The extended implementation of TileLayer.

Parameters:multiples (BlobShape) – The multiples. Refer TileParameter.multiples.
class dragon.vm.caffe.layers.common.ReductionLayer(LayerParameter)

The extended implementation of ReductionLayer.

Parameters:
class dragon.vm.caffe.layers.common.ExpandDimsLayer(LayerParameter)

The implementation of ExpandDimsLayer.

Parameters:axis (int) – This axis to expand at. Refer ExpandDimsParameter.axis.
class dragon.vm.caffe.layers.common.StopGradientLayer(LayerParameter)

The implementation of StopGradientLayer.

class dragon.vm.caffe.layers.common.ProposalLayer(LayerParameter)

The implementation of ProposalLayer.

Parameters:
  • stride (sequence of int) – The stride of anchors. Refer ProposalParameter.stride.
  • scale (sequence of float) – The scales of anchors. Refer ProposalParameter.scale.
  • ratio (sequence of float) – The ratios of anchors. Refer ProposalParameter.ratio.
  • pre_nms_top_n (int) – The num of anchors before nms. Refer ProposalParameter.pre_nms_topn.
  • post_nms_top_n (int) – The num of anchors after nms. Refer ProposalParameter.post_nms_topn.
  • nms_thresh (float) – The threshold of nms. Refer ProposalParameter.nms_thresh.
  • min_size (int) – The min size of anchors. Refer ProposalParameter.min_size.
  • min_level (int) – Finest level of the FPN pyramid. Refer ProposalParameter.min_level.
  • max_level (int) – Coarsest level of the FPN pyramid. Refer ProposalParameter.max_level.
  • canonical_scale (int) – The baseline scale of mapping policy. Refer ProposalParameter.canonical_scale.
  • canonical_level (int) – Heuristic level of the canonical scale. Refer ProposalParameter.canonical_level.
class dragon.vm.caffe.layers.common.CastLayer(LayerParameter)

The implementation of CastLayer.

Parameters:dtype (str) – The stride of anchors. Refer CastParameter.dtype.

The Implementation of the data layers.

class dragon.vm.caffe.layers.loss.SoftmaxWithLossLayer(LayerParameter)

The implementation of SoftmaxWithLossLayer.

Parameters:
class dragon.vm.caffe.layers.loss.SigmoidCrossEntropyLossLayer(LayerParameter)

The implementation of SigmoidCrossEntropyLossLayer.

Parameters:
class dragon.vm.caffe.layers.loss.L2LossLayer(LayerParameter)

The implementation of L2LossLayer.

Parameters:
class dragon.vm.caffe.layers.loss.SmoothL1LossLayer(LayerParameter)

The implementation of SmoothL1LossLayer.

Parameters:
class dragon.vm.caffe.layers.loss.SigmoidWithFocalLossLayer(LayerParameter)

The implementation of SigmoidWithFocalLossLayer.

Parameters:
class dragon.vm.caffe.layers.loss.SoftmaxWithFocalLossLayer(LayerParameter)

The implementation of SoftmaxWithFocalLossLayer.

Parameters:

The Implementation of the mpi layers.

class dragon.vm.caffe.layers.mpi.MPIBroadcastLayer(LayerParameter)

The implementation of MPIBroadcastLayer.

Parameters:root (int) – The world rank of root. Refer MPIParameter.root.
class dragon.vm.caffe.layers.mpi.MPIGatherLayer(LayerParameter)

The implementation of MPIGatherLayer.

Parameters:root (int) – The world rank of root. Refer MPIParameter.root.