MCPcopy Create free account
hub / github.com/NeuralNetworkVerification/Marabou / createDeepPolyElement

Method createDeepPolyElement

src/nlr/DeepPolyAnalysis.cpp:200–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200DeepPolyElement *DeepPolyAnalysis::createDeepPolyElement( Layer *layer )
201{
202 Layer::Type type = layer->getLayerType();
203 DeepPolyElement *deepPolyElement;
204 if ( type == Layer::INPUT )
205 deepPolyElement = new DeepPolyInputElement( layer );
206 else if ( type == Layer::WEIGHTED_SUM )
207 {
208 deepPolyElement = new DeepPolyWeightedSumElement( layer );
209 // Weighted sum layers need working memory for back substitution
210 deepPolyElement->setWorkingMemory( _work1SymbolicLb,
211 _work1SymbolicUb,
212 _work2SymbolicLb,
213 _work2SymbolicUb,
214 _workSymbolicLowerBias,
215 _workSymbolicUpperBias );
216 }
217 else if ( type == Layer::RELU )
218 deepPolyElement = new DeepPolyReLUElement( layer );
219 else if ( type == Layer::ROUND )
220 deepPolyElement = new DeepPolyRoundElement( layer );
221 else if ( type == Layer::LEAKY_RELU )
222 deepPolyElement = new DeepPolyLeakyReLUElement( layer );
223 else if ( type == Layer::SIGN )
224 deepPolyElement = new DeepPolySignElement( layer );
225 else if ( type == Layer::ABSOLUTE_VALUE )
226 deepPolyElement = new DeepPolyAbsoluteValueElement( layer );
227 else if ( type == Layer::MAX )
228 deepPolyElement = new DeepPolyMaxPoolElement( layer );
229 else if ( type == Layer::SIGMOID )
230 deepPolyElement = new DeepPolySigmoidElement( layer );
231 else if ( type == Layer::SOFTMAX )
232 deepPolyElement = new DeepPolySoftmaxElement( layer, _maxLayerSize );
233 else if ( type == Layer::BILINEAR )
234 deepPolyElement = new DeepPolyBilinearElement( layer );
235 else
236 throw NLRError( NLRError::LAYER_TYPE_NOT_SUPPORTED,
237 Stringf( "Layer %u not yet supported", layer->getLayerType() ).ascii() );
238 return deepPolyElement;
239}
240
241void DeepPolyAnalysis::log( const String &message )
242{

Callers

nothing calls this directly

Calls 5

NLRErrorClass · 0.85
StringfClass · 0.85
setWorkingMemoryMethod · 0.80
asciiMethod · 0.80
getLayerTypeMethod · 0.45

Tested by

no test coverage detected