This will move loop invariant opbuilder_context variable outside of the for loop
Signed-off-by: SaeHie Park <saehie.park@samsung.com>
return res;
};
+ caffeimport::GraphBuilderContext opbuilder_context(module.get(), data.get(), blk, shape_ctx,
+ bag_ctx, weight_ctx);
+
for (const auto &layer : _prototxt->layer())
{
assert(layer.has_name());
use(layer.bottom(n));
}
- caffeimport::GraphBuilderContext opbuilder_context(module.get(), data.get(), blk, shape_ctx,
- bag_ctx, weight_ctx);
-
if (const auto *graph_builder = caffeimport::GraphBuilderRegistry::get().lookup(layer.type()))
{
graph_builder->build(layer, &opbuilder_context);