// Change the input proto-network descriptor to merged network
ProtoNetworkExternalizer pne = new BinaryProtoNetworkExternalizer();
final String artpath = artifactPath.getAbsolutePath();
final String s1path = asPath(artpath, STAGE1_OUTPUT);
createDirectoryArtifact(artifactPath, STAGE1_OUTPUT);
pne.writeProtoNetwork(pn, s1path);
// if debug, then save the text-based merged network
if (withDebug()) {
TextProtoNetworkExternalizer textExternalizer =
new TextProtoNetworkExternalizer();