From 41c482d672ca971c9ff49c9aec32591fcffd7b1c Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 17 Apr 2018 13:23:26 +0100 Subject: COMPMID-1042: Graph / Stream not working on x86 Avoid unspecified behavior in graph construction. This is fixed in C++17. Change-Id: I4ef45cb139bbd838103a9922441e32d2d16c33d2 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/127975 Reviewed-by: Michalis Spyrou Tested-by: Jenkins Reviewed-by: Anthony Barbier --- examples/graph_inception_v3.cpp | 58 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'examples/graph_inception_v3.cpp') diff --git a/examples/graph_inception_v3.cpp b/examples/graph_inception_v3.cpp index 22e6f6e489..ed79ba65d8 100644 --- a/examples/graph_inception_v3.cpp +++ b/examples/graph_inception_v3.cpp @@ -152,35 +152,35 @@ public: 0.001f) << ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)) - << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 3, PadStrideInfo(2, 2, 0, 0, DimensionRoundingType::CEIL))) - - << get_inception_node_A(data_path, "Mixed_5b", 64U, std::make_tuple(48U, 64U), std::make_tuple(64U, 96U, 96U), - 32U) - << get_inception_node_A(data_path, "Mixed_5c", 64U, std::make_tuple(48U, 64U), std::make_tuple(64U, 96U, 96U), - 64U, true) - << get_inception_node_A(data_path, "Mixed_5d", 64U, std::make_tuple(48U, 64U), std::make_tuple(64U, 96U, 96U), - 64U) - - << get_inception_node_B(data_path, "Mixed_6a", 384U, std::make_tuple(64U, 96U, 96U)) - - << get_inception_node_C(data_path, "Mixed_6b", 192U, std::make_tuple(128U, 128U, 192U), - std::make_tuple(128U, 128U, 128U, 128U, 192U), 192U) - << get_inception_node_C(data_path, "Mixed_6c", 192U, std::make_tuple(160U, 160U, 192U), - std::make_tuple(160U, 160U, 160U, 160U, 192U), 192U) - << get_inception_node_C(data_path, "Mixed_6d", 192U, std::make_tuple(160U, 160U, 192U), - std::make_tuple(160U, 160U, 160U, 160U, 192U), 192U) - << get_inception_node_C(data_path, "Mixed_6e", 192U, std::make_tuple(192U, 192U, 192U), - std::make_tuple(192U, 192U, 192U, 192U, 192U), 192U) - - << get_inception_node_D(data_path, "Mixed_7a", std::make_tuple(192U, 320U), - std::make_tuple(192U, 192U, 192U, 192U)) - - << get_inception_node_E(data_path, "Mixed_7b", 320U, std::make_tuple(384U, 384U, 384U), - std::make_tuple(448U, 384U, 384U, 384U), 192U) - << get_inception_node_E(data_path, "Mixed_7c", 320U, std::make_tuple(384U, 384U, 384U), - std::make_tuple(448U, 384U, 384U, 384U), 192U, true) - - << PoolingLayer(PoolingLayerInfo(PoolingType::AVG, 8, PadStrideInfo(1, 1, 0, 0, DimensionRoundingType::CEIL))) + << PoolingLayer(PoolingLayerInfo(PoolingType::MAX, 3, PadStrideInfo(2, 2, 0, 0, DimensionRoundingType::CEIL))); + + graph << get_inception_node_A(data_path, "Mixed_5b", 64U, std::make_tuple(48U, 64U), std::make_tuple(64U, 96U, 96U), + 32U); + graph << get_inception_node_A(data_path, "Mixed_5c", 64U, std::make_tuple(48U, 64U), std::make_tuple(64U, 96U, 96U), + 64U, true); + graph << get_inception_node_A(data_path, "Mixed_5d", 64U, std::make_tuple(48U, 64U), std::make_tuple(64U, 96U, 96U), + 64U); + + graph << get_inception_node_B(data_path, "Mixed_6a", 384U, std::make_tuple(64U, 96U, 96U)); + + graph << get_inception_node_C(data_path, "Mixed_6b", 192U, std::make_tuple(128U, 128U, 192U), + std::make_tuple(128U, 128U, 128U, 128U, 192U), 192U); + graph << get_inception_node_C(data_path, "Mixed_6c", 192U, std::make_tuple(160U, 160U, 192U), + std::make_tuple(160U, 160U, 160U, 160U, 192U), 192U); + graph << get_inception_node_C(data_path, "Mixed_6d", 192U, std::make_tuple(160U, 160U, 192U), + std::make_tuple(160U, 160U, 160U, 160U, 192U), 192U); + graph << get_inception_node_C(data_path, "Mixed_6e", 192U, std::make_tuple(192U, 192U, 192U), + std::make_tuple(192U, 192U, 192U, 192U, 192U), 192U); + + graph << get_inception_node_D(data_path, "Mixed_7a", std::make_tuple(192U, 320U), + std::make_tuple(192U, 192U, 192U, 192U)); + + graph << get_inception_node_E(data_path, "Mixed_7b", 320U, std::make_tuple(384U, 384U, 384U), + std::make_tuple(448U, 384U, 384U, 384U), 192U); + graph << get_inception_node_E(data_path, "Mixed_7c", 320U, std::make_tuple(384U, 384U, 384U), + std::make_tuple(448U, 384U, 384U, 384U), 192U, true); + + graph << PoolingLayer(PoolingLayerInfo(PoolingType::AVG, 8, PadStrideInfo(1, 1, 0, 0, DimensionRoundingType::CEIL))) << ConvolutionLayer(1U, 1U, 1001U, get_weights_accessor(data_path, "/cnn_data/inceptionv3_model/Logits_Conv2d_1c_1x1_weights.npy"), get_weights_accessor(data_path, -- cgit v1.2.1