ArmNN  NotReleased
StaticRangeVisitor Class Reference

Visitor class to establish min/max ranges based on the type of the layer. More...

#include <StaticRangeVisitor.hpp>

Inheritance diagram for StaticRangeVisitor:
LayerVisitorBase< VisitorNoThrowPolicy > ILayerVisitor

Public Member Functions

 StaticRangeVisitor (RangeTracker &rangeTracker)
 
 ~StaticRangeVisitor ()=default
 
void VisitAdditionLayer (const IConnectableLayer *layer, const char *name=nullptr) override
 Functions to set the Range on a per-layer-type basis. More...
 
void VisitBatchNormalizationLayer (const IConnectableLayer *layer, const BatchNormalizationDescriptor &desc, const ConstTensor &mean, const ConstTensor &variance, const ConstTensor &beta, const ConstTensor &gamma, const char *name=nullptr) override
 
void VisitConvolution2dLayer (const IConnectableLayer *layer, const Convolution2dDescriptor &convolution2dDescriptor, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr) override
 
void VisitDepthwiseConvolution2dLayer (const IConnectableLayer *layer, const DepthwiseConvolution2dDescriptor &desc, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name=nullptr) override
 
void VisitActivationLayer (const IConnectableLayer *layer, const ActivationDescriptor &activationDescriptor, const char *name=nullptr) override
 
void VisitFullyConnectedLayer (const IConnectableLayer *layer, const FullyConnectedDescriptor &desc, const ConstTensor &weights, const Optional< ConstTensor > &biases, const char *name) override
 
void VisitPermuteLayer (const IConnectableLayer *layer, const PermuteDescriptor &permuteDescriptor, const char *name) override
 
void VisitSpaceToBatchNdLayer (const IConnectableLayer *layer, const SpaceToBatchNdDescriptor &spaceToBatchNdDescriptor, const char *name=nullptr) override
 
void VisitPooling2dLayer (const IConnectableLayer *layer, const Pooling2dDescriptor &pooling2dDescriptor, const char *name) override
 
void VisitSoftmaxLayer (const IConnectableLayer *layer, const SoftmaxDescriptor &softmaxDescriptor, const char *name=nullptr) override
 
void VisitConcatLayer (const IConnectableLayer *layer, const OriginsDescriptor &originsDescriptor, const char *name=nullptr) override
 
void VisitConstantLayer (const IConnectableLayer *layer, const ConstTensor &input, const char *name=nullptr) override
 
void VisitReshapeLayer (const IConnectableLayer *layer, const ReshapeDescriptor &reshapeDescriptor, const char *name=nullptr) override
 
void VisitSplitterLayer (const IConnectableLayer *layer, const SplitterDescriptor &splitterDescriptor, const char *name=nullptr) override
 
void VisitResizeBilinearLayer (const IConnectableLayer *layer, const ResizeBilinearDescriptor &resizeDesc, const char *name=nullptr) override
 
void VisitResizeLayer (const IConnectableLayer *layer, const ResizeDescriptor &resizeDescriptor, const char *name=nullptr) override
 
void VisitStridedSliceLayer (const IConnectableLayer *layer, const StridedSliceDescriptor &stridedSliceDescriptor, const char *name=nullptr) override
 
void VisitBatchToSpaceNdLayer (const IConnectableLayer *layer, const BatchToSpaceNdDescriptor &batchToSpaceNdDescriptor, const char *name=nullptr) override
 
- Public Member Functions inherited from LayerVisitorBase< VisitorNoThrowPolicy >
void VisitAbsLayer (const IConnectableLayer *, const char *) override
 
void VisitActivationLayer (const IConnectableLayer *, const ActivationDescriptor &, const char *) override
 
void VisitAdditionLayer (const IConnectableLayer *, const char *) override
 
void VisitArgMinMaxLayer (const IConnectableLayer *, const ArgMinMaxDescriptor &, const char *) override
 
void VisitBatchNormalizationLayer (const IConnectableLayer *, const BatchNormalizationDescriptor &, const ConstTensor &, const ConstTensor &, const ConstTensor &, const ConstTensor &, const char *) override
 
void VisitBatchToSpaceNdLayer (const IConnectableLayer *, const BatchToSpaceNdDescriptor &, const char *) override
 
void VisitComparisonLayer (const IConnectableLayer *, const ComparisonDescriptor &, const char *) override
 
void VisitConcatLayer (const IConnectableLayer *, const ConcatDescriptor &, const char *) override
 
void VisitConstantLayer (const IConnectableLayer *, const ConstTensor &, const char *) override
 
void VisitConvolution2dLayer (const IConnectableLayer *, const Convolution2dDescriptor &, const ConstTensor &, const Optional< ConstTensor > &, const char *) override
 
void VisitDepthToSpaceLayer (const IConnectableLayer *, const DepthToSpaceDescriptor &, const char *) override
 
void VisitDepthwiseConvolution2dLayer (const IConnectableLayer *, const DepthwiseConvolution2dDescriptor &, const ConstTensor &, const Optional< ConstTensor > &, const char *) override
 
void VisitDequantizeLayer (const IConnectableLayer *, const char *) override
 
void VisitDetectionPostProcessLayer (const IConnectableLayer *, const DetectionPostProcessDescriptor &, const ConstTensor &, const char *) override
 
void VisitDivisionLayer (const IConnectableLayer *, const char *) override
 
void VisitElementwiseUnaryLayer (const IConnectableLayer *, const ElementwiseUnaryDescriptor &, const char *) override
 
void VisitEqualLayer (const IConnectableLayer *, const char *) override
 
void VisitFloorLayer (const IConnectableLayer *, const char *) override
 
void VisitFullyConnectedLayer (const IConnectableLayer *, const FullyConnectedDescriptor &, const ConstTensor &, const Optional< ConstTensor > &, const char *) override
 
void VisitGatherLayer (const IConnectableLayer *, const char *) override
 
void VisitGreaterLayer (const IConnectableLayer *, const char *) override
 
void VisitInputLayer (const IConnectableLayer *, LayerBindingId, const char *) override
 
void VisitInstanceNormalizationLayer (const IConnectableLayer *, const InstanceNormalizationDescriptor &, const char *) override
 
void VisitL2NormalizationLayer (const IConnectableLayer *, const L2NormalizationDescriptor &, const char *) override
 
void VisitLogSoftmaxLayer (const IConnectableLayer *, const LogSoftmaxDescriptor &, const char *) override
 
void VisitLstmLayer (const IConnectableLayer *, const LstmDescriptor &, const LstmInputParams &, const char *) override
 
void VisitMaximumLayer (const IConnectableLayer *, const char *) override
 
void VisitMeanLayer (const IConnectableLayer *, const MeanDescriptor &, const char *) override
 
void VisitMergeLayer (const IConnectableLayer *, const char *) override
 
void VisitMergerLayer (const IConnectableLayer *, const MergerDescriptor &, const char *) override
 
void VisitMinimumLayer (const IConnectableLayer *, const char *) override
 
void VisitMultiplicationLayer (const IConnectableLayer *, const char *) override
 
void VisitNormalizationLayer (const IConnectableLayer *, const NormalizationDescriptor &, const char *) override
 
void VisitOutputLayer (const IConnectableLayer *, LayerBindingId, const char *) override
 
void VisitPadLayer (const IConnectableLayer *, const PadDescriptor &, const char *) override
 
void VisitPermuteLayer (const IConnectableLayer *, const PermuteDescriptor &, const char *) override
 
void VisitPooling2dLayer (const IConnectableLayer *, const Pooling2dDescriptor &, const char *) override
 
void VisitPreluLayer (const IConnectableLayer *, const char *) override
 
void VisitQuantizeLayer (const IConnectableLayer *, const char *) override
 
void VisitQuantizedLstmLayer (const IConnectableLayer *, const QuantizedLstmInputParams &, const char *) override
 
void VisitReshapeLayer (const IConnectableLayer *, const ReshapeDescriptor &, const char *) override
 
void VisitResizeBilinearLayer (const IConnectableLayer *, const ResizeBilinearDescriptor &, const char *) override
 
void VisitResizeLayer (const IConnectableLayer *, const ResizeDescriptor &, const char *) override
 
void VisitRsqrtLayer (const IConnectableLayer *, const char *) override
 
void VisitSliceLayer (const IConnectableLayer *, const SliceDescriptor &, const char *) override
 
void VisitSoftmaxLayer (const IConnectableLayer *, const SoftmaxDescriptor &, const char *) override
 
void VisitSpaceToBatchNdLayer (const IConnectableLayer *, const SpaceToBatchNdDescriptor &, const char *) override
 
void VisitSpaceToDepthLayer (const IConnectableLayer *, const SpaceToDepthDescriptor &, const char *) override
 
void VisitSplitterLayer (const IConnectableLayer *, const ViewsDescriptor &, const char *) override
 
void VisitStackLayer (const IConnectableLayer *, const StackDescriptor &, const char *) override
 
void VisitStandInLayer (const IConnectableLayer *, const StandInDescriptor &, const char *) override
 
void VisitStridedSliceLayer (const IConnectableLayer *, const StridedSliceDescriptor &, const char *) override
 
void VisitSubtractionLayer (const IConnectableLayer *, const char *) override
 
void VisitSwitchLayer (const IConnectableLayer *, const char *) override
 
void VisitTransposeConvolution2dLayer (const IConnectableLayer *, const TransposeConvolution2dDescriptor &, const ConstTensor &, const Optional< ConstTensor > &, const char *) override
 
- Public Member Functions inherited from ILayerVisitor
virtual void StartVisit ()
 
virtual void FinishVisit ()
 

Additional Inherited Members

- Protected Member Functions inherited from LayerVisitorBase< VisitorNoThrowPolicy >
 LayerVisitorBase ()
 
virtual ~LayerVisitorBase ()
 
- Protected Member Functions inherited from ILayerVisitor
 ILayerVisitor ()
 
virtual ~ILayerVisitor ()
 

Detailed Description

Visitor class to establish min/max ranges based on the type of the layer.

Definition at line 19 of file StaticRangeVisitor.hpp.

Constructor & Destructor Documentation

◆ StaticRangeVisitor()

◆ ~StaticRangeVisitor()

~StaticRangeVisitor ( )
default

Member Function Documentation

◆ VisitActivationLayer()

void VisitActivationLayer ( const IConnectableLayer layer,
const ActivationDescriptor activationDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function that an activation layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
activationDescriptor- ActivationDescriptor to configure the activation.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 81 of file StaticRangeVisitor.cpp.

References armnn::Abs, armnn::BoundedReLu, armnn::LeakyReLu, armnn::Linear, ActivationDescriptor::m_A, ActivationDescriptor::m_Function, armnn::ReLu, armnn::SoftReLu, and armnn::TanH.

84 {
85  boost::ignore_unused(name);
86  switch (activationDescriptor.m_Function)
87  {
88  // Range is 0, 15 for Abs, Linear, ReLu and Soft ReLu
93  SetRange(layer, 0, 0.f, 15.f);
94  break;
96  SetRange(layer, 0, 0.f, activationDescriptor.m_A);
97  break;
99  SetRange(layer, 0, -1.f, 1.f);
100  break;
102  SetRange(layer, 0, -5.f, 15.f);
103  break;
104  default:
105  SetRange(layer, 0, -15.f, 15.f);
106  break;
107  }
108 }

◆ VisitAdditionLayer()

void VisitAdditionLayer ( const IConnectableLayer layer,
const char *  name = nullptr 
)
overridevirtual

Functions to set the Range on a per-layer-type basis.

Implements ILayerVisitor.

Definition at line 32 of file StaticRangeVisitor.cpp.

33 {
34  boost::ignore_unused(name);
35  SetRange(layer, 0, -20.f, 20.f);
36 }

◆ VisitBatchNormalizationLayer()

void VisitBatchNormalizationLayer ( const IConnectableLayer layer,
const BatchNormalizationDescriptor desc,
const ConstTensor mean,
const ConstTensor variance,
const ConstTensor beta,
const ConstTensor gamma,
const char *  name = nullptr 
)
overridevirtual

Function that a batch normalization layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
mean- Pre-calculated mean for each channel.
variance- Pre-calculated variance for each channel.
beta- Per-channel additive factor.
gamma- Per-channel multiplicative factor.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 38 of file StaticRangeVisitor.cpp.

45 {
46  boost::ignore_unused(desc);
47  boost::ignore_unused(mean);
48  boost::ignore_unused(variance);
49  boost::ignore_unused(beta);
50  boost::ignore_unused(gamma);
51  boost::ignore_unused(name);
52  SetRange(layer, 0, -15.0f, 15.0f);
53 }

◆ VisitBatchToSpaceNdLayer()

void VisitBatchToSpaceNdLayer ( const IConnectableLayer layer,
const BatchToSpaceNdDescriptor batchToSpaceNdDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function that a batch to space ND layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
batchToSpaceNdDescriptor- Description of the layer.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 252 of file StaticRangeVisitor.cpp.

255 {
256  boost::ignore_unused(batchToSpaceNdDescriptor);
257  boost::ignore_unused(name);
258  ForwardParentParameters(layer);
259 }

◆ VisitConcatLayer()

void VisitConcatLayer ( const IConnectableLayer layer,
const OriginsDescriptor concatDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function that a concat layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
concatDescriptor- ConcatDescriptor (synonym for OriginsDescriptor) to configure the concatenation process. Number of Views must be equal to the number of inputs, and their order must match - e.g. first view corresponds to the first input, second view to the second input, etc....
name- Optional name for the layer.

Reimplemented from ILayerVisitor.

Definition at line 159 of file StaticRangeVisitor.cpp.

References IOutputSlot::CalculateIndexOnOwner(), IInputSlot::GetConnection(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetNumInputSlots(), IOutputSlot::GetOwningLayerGuid(), and RangeTracker::GetRange().

162 {
163  boost::ignore_unused(originsDescriptor);
164  boost::ignore_unused(name);
165  float min = std::numeric_limits<float>::max();
166  float max = std::numeric_limits<float>::lowest();
167  for (unsigned int i = 0; i < layer->GetNumInputSlots(); ++i)
168  {
169  const IOutputSlot* outputSlot = layer->GetInputSlot(i).GetConnection();
170  LayerGuid layerId = outputSlot->GetOwningLayerGuid();
171  unsigned int slotIndex = outputSlot->CalculateIndexOnOwner();
172  RangeTracker::MinMaxRange range = m_RangeTracker.GetRange(layerId, slotIndex);
173  min = std::min(min, range.first);
174  max = std::max(max, range.second);
175  }
176  SetRange(layer, 0, min, max);
177 }
std::pair< float, float > MinMaxRange
MinMaxRange GetRange(LayerGuid guid, unsigned int idx) const
Retrieve the Range for a particular output slot on a particular layer.
profiling::ProfilingGuid LayerGuid
Define LayerGuid type.
Definition: Types.hpp:233

◆ VisitConstantLayer()

void VisitConstantLayer ( const IConnectableLayer layer,
const ConstTensor input,
const char *  name = nullptr 
)
overridevirtual

Function a layer with no inputs and a single output, which always corresponds to the passed in constant tensor should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
input- Tensor to be provided as the only output of the layer. The layer will maintain its own copy of the tensor data, meaning the memory referenced by input can be freed or reused after this function is called.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 179 of file StaticRangeVisitor.cpp.

References armnn::Float32, BaseTensor< MemoryType >::GetDataType(), BaseTensor< MemoryType >::GetMemoryArea(), and BaseTensor< MemoryType >::GetNumElements().

182 {
183  boost::ignore_unused(name);
184 
185  if (input.GetDataType() != DataType::Float32)
186  {
187  throw InvalidArgumentException("Quantization is supported only for FP32 tensors");
188  }
189 
190  // Work out the range based on the input constants
191  unsigned int inputNumElements = input.GetNumElements();
192  const float* inputData = reinterpret_cast<const float*>(input.GetMemoryArea());
193 
194  float min = std::numeric_limits<float>::max();
195  float max = std::numeric_limits<float>::lowest();
196 
197  for (unsigned int i = 0; i < inputNumElements; i++)
198  {
199  const float inputValue = inputData[i];
200 
201  min = std::min(min, inputValue);
202  max = std::max(max, inputValue);
203  }
204  SetRange(layer, 0, min, max);
205 }

◆ VisitConvolution2dLayer()

void VisitConvolution2dLayer ( const IConnectableLayer layer,
const Convolution2dDescriptor convolution2dDescriptor,
const ConstTensor weights,
const Optional< ConstTensor > &  biases,
const char *  name = nullptr 
)
overridevirtual

Function that a 2D convolution layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
convolution2dDescriptor- Description of the 2D convolution layer.
weights- Tensor for the weights data.
biases- Optional tensor for the bias data. If specified, must match the output tensor shape.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 55 of file StaticRangeVisitor.cpp.

60 {
61  boost::ignore_unused(convolution2dDescriptor);
62  boost::ignore_unused(weights);
63  boost::ignore_unused(biases);
64  boost::ignore_unused(name);
65  SetRange(layer, 0, -15.0f, 15.0f);
66 }

◆ VisitDepthwiseConvolution2dLayer()

void VisitDepthwiseConvolution2dLayer ( const IConnectableLayer layer,
const DepthwiseConvolution2dDescriptor convolution2dDescriptor,
const ConstTensor weights,
const Optional< ConstTensor > &  biases,
const char *  name = nullptr 
)
overridevirtual

Function that a 2D depthwise convolution layer with biases should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
convolution2dDescriptor- Description of the 2D depthwise convolution layer.
weights- Tensor for the weights. Expected format: [channelMultiplier, inputChannels, height, width].
biases- Optional tensor for the bias data. If specified, must match the output tensor shape.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 68 of file StaticRangeVisitor.cpp.

73 {
74  boost::ignore_unused(desc);
75  boost::ignore_unused(weights);
76  boost::ignore_unused(biases);
77  boost::ignore_unused(name);
78  SetRange(layer, 0, -15.0f, 15.0f);
79 }

◆ VisitFullyConnectedLayer()

void VisitFullyConnectedLayer ( const IConnectableLayer layer,
const FullyConnectedDescriptor fullyConnectedDescriptor,
const ConstTensor weights,
const Optional< ConstTensor > &  biases,
const char *  name 
)
overridevirtual

Function that a fully connected layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
fullyConnectedDescriptor- Description of the fully connected layer.
weights- Tensor for the weights data.
biases- Optional tensor for the bias data.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 110 of file StaticRangeVisitor.cpp.

115 {
116  boost::ignore_unused(desc);
117  boost::ignore_unused(weights);
118  boost::ignore_unused(biases);
119  boost::ignore_unused(name);
120  SetRange(layer, 0, -15.0f, 15.0f);
121 }

◆ VisitPermuteLayer()

void VisitPermuteLayer ( const IConnectableLayer layer,
const PermuteDescriptor permuteDescriptor,
const char *  name 
)
overridevirtual

Function that a permute layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
permuteDescriptor- PermuteDescriptor to configure the permute.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 123 of file StaticRangeVisitor.cpp.

126 {
127  boost::ignore_unused(permuteDescriptor);
128  boost::ignore_unused(name);
129  ForwardParentParameters(layer);
130 }

◆ VisitPooling2dLayer()

void VisitPooling2dLayer ( const IConnectableLayer layer,
const Pooling2dDescriptor pooling2dDescriptor,
const char *  name 
)
overridevirtual

Function that a pooling layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
pooling2dDescriptor- Pooling2dDescriptor to configure the pooling.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 141 of file StaticRangeVisitor.cpp.

144 {
145  boost::ignore_unused(pooling2dDescriptor);
146  boost::ignore_unused(name);
147  ForwardParentParameters(layer);
148 }

◆ VisitReshapeLayer()

void VisitReshapeLayer ( const IConnectableLayer layer,
const ReshapeDescriptor reshapeDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function a reshape layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
reshapeDescriptor- Parameters for the reshape operation.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 207 of file StaticRangeVisitor.cpp.

210 {
211  boost::ignore_unused(reshapeDescriptor);
212  boost::ignore_unused(name);
213  ForwardParentParameters(layer);
214 }

◆ VisitResizeBilinearLayer()

void VisitResizeBilinearLayer ( const IConnectableLayer layer,
const ResizeBilinearDescriptor resizeDesc,
const char *  name = nullptr 
)
overridevirtual

Function that a resize bilinear layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
resizeDesc- Parameters for the resize operation.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 225 of file StaticRangeVisitor.cpp.

228 {
229  boost::ignore_unused(resizeDesc);
230  boost::ignore_unused(name);
231  ForwardParentParameters(layer);
232 }

◆ VisitResizeLayer()

void VisitResizeLayer ( const IConnectableLayer layer,
const ResizeDescriptor resizeDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function that a resize layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
resizeDescriptor- Parameters for the resize operation.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 234 of file StaticRangeVisitor.cpp.

237 {
238  boost::ignore_unused(resizeDescriptor);
239  boost::ignore_unused(name);
240  ForwardParentParameters(layer);
241 }

◆ VisitSoftmaxLayer()

void VisitSoftmaxLayer ( const IConnectableLayer layer,
const SoftmaxDescriptor softmaxDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function that a softmax layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
softmaxDescriptor- SoftmaxDescriptor to configure the softmax.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 150 of file StaticRangeVisitor.cpp.

153 {
154  boost::ignore_unused(softmaxDescriptor);
155  boost::ignore_unused(name);
156  SetRange(layer, 0, 0.f, 1.f);
157 }

◆ VisitSpaceToBatchNdLayer()

void VisitSpaceToBatchNdLayer ( const IConnectableLayer layer,
const SpaceToBatchNdDescriptor spaceToBatchNdDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function a space to batch layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
spaceToBatchNdDescriptor- Parameters for the space to batch operation.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 132 of file StaticRangeVisitor.cpp.

135 {
136  boost::ignore_unused(spaceToBatchNdDescriptor);
137  boost::ignore_unused(name);
138  ForwardParentParameters(layer);
139 }

◆ VisitSplitterLayer()

void VisitSplitterLayer ( const IConnectableLayer layer,
const SplitterDescriptor splitterDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function that a splitter layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
splitterDescriptor- ViewsDescriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc....
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 216 of file StaticRangeVisitor.cpp.

219 {
220  boost::ignore_unused(splitterDescriptor);
221  boost::ignore_unused(name);
222  ForwardParentParameters(layer);
223 }

◆ VisitStridedSliceLayer()

void VisitStridedSliceLayer ( const IConnectableLayer layer,
const StridedSliceDescriptor stridedSliceDescriptor,
const char *  name = nullptr 
)
overridevirtual

Function a strided slice layer should call back to when its Accept(ILayerVisitor&) function is invoked.

Parameters
layer- pointer to the layer which is calling back to this visit function.
stridedSliceDescriptor- Parameters for the strided slice operation.
name- Optional name for the layer.

Implements ILayerVisitor.

Definition at line 243 of file StaticRangeVisitor.cpp.

246 {
247  boost::ignore_unused(stridedSliceDescriptor);
248  boost::ignore_unused(name);
249  ForwardParentParameters(layer);
250 }

The documentation for this class was generated from the following files: