Update layer_factory.cpp