summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2014-05-14 12:35:33 -0700
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2014-05-14 12:35:33 -0700
commita894796977227aa34a58e273a5d5a93d2dafbffd (patch)
tree177e3fe9503b3abc085910da5104c0bd4270da94 /tools
parentf436cb20df62ed7c5760e8da6f13da28606ac86d (diff)
downloadcaffeonacl-a894796977227aa34a58e273a5d5a93d2dafbffd.tar.gz
caffeonacl-a894796977227aa34a58e273a5d5a93d2dafbffd.tar.bz2
caffeonacl-a894796977227aa34a58e273a5d5a93d2dafbffd.zip
fix workaround in net prototxt upgrade
Diffstat (limited to 'tools')
-rw-r--r--tools/upgrade_net_proto_text.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/upgrade_net_proto_text.cpp b/tools/upgrade_net_proto_text.cpp
index aefdc7e2..8a77f752 100644
--- a/tools/upgrade_net_proto_text.cpp
+++ b/tools/upgrade_net_proto_text.cpp
@@ -44,13 +44,8 @@ int main(int argc, char** argv) {
NetParameterPrettyPrint net_param_pretty;
NetParameterToPrettyPrint(net_param, &net_param_pretty);
- // TODO(jdonahue): figure out why WriteProtoToTextFile doesn't work
- // (no file is created).
- // WriteProtoToTextFile(net_param_pretty, argv[2]);
- ofstream output_proto;
- output_proto.open(argv[2]);
- output_proto << net_param_pretty.DebugString();
- output_proto.close();
+ // Save new format prototxt.
+ WriteProtoToTextFile(net_param_pretty, argv[2]);
LOG(ERROR) << "Wrote upgraded NetParameter text proto to " << argv[2];
return !success;