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

Method DeepPolyAnalysis

src/nlr/DeepPolyAnalysis.cpp:42–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40namespace NLR {
41
42DeepPolyAnalysis::DeepPolyAnalysis( LayerOwner *layerOwner )
43 : _layerOwner( layerOwner )
44 , _work1SymbolicLb( NULL )
45 , _work1SymbolicUb( NULL )
46 , _work2SymbolicLb( NULL )
47 , _work2SymbolicUb( NULL )
48 , _workSymbolicLowerBias( NULL )
49 , _workSymbolicUpperBias( NULL )
50{
51 const Map<unsigned, Layer *> &layers = _layerOwner->getLayerIndexToLayer();
52 // Get the maximal layer size
53 unsigned maxLayerSize = 0;
54 for ( const auto &pair : layers )
55 {
56 unsigned thisLayerSize = pair.second->getSize();
57 if ( thisLayerSize > maxLayerSize )
58 maxLayerSize = thisLayerSize;
59 }
60 _maxLayerSize = maxLayerSize;
61
62 allocateMemory();
63 for ( const auto &pair : layers )
64 {
65 /*
66 Go over the layers, one by one. Each time construct and execute
67 the abstract element.
68 */
69 unsigned index = pair.first;
70 Layer *layer = pair.second;
71 log( Stringf( "Creating deeppoly element for layer %u...", index ) );
72 DeepPolyElement *deepPolyElement = createDeepPolyElement( layer );
73 _deepPolyElements[index] = deepPolyElement;
74 log( Stringf( "Creating deeppoly element for layer %u - done", index ) );
75 }
76}
77
78DeepPolyAnalysis::~DeepPolyAnalysis()
79{

Callers

nothing calls this directly

Calls 2

StringfClass · 0.85
getSizeMethod · 0.45

Tested by

no test coverage detected