summaryrefslogtreecommitdiff
path: root/src/caffe/net.cpp
diff options
context:
space:
mode:
authorJeff Donahue <jeff.donahue@gmail.com>2014-03-23 21:53:59 -0700
committerJeff Donahue <jeff.donahue@gmail.com>2014-03-27 23:42:29 -0700
commit23bfeeb14381aa31e7d355afeddf9676ca1a3347 (patch)
treecb24bbb3394b1dc45986077af9d7ee32962ee4c6 /src/caffe/net.cpp
parent927642e40853db87d6ad674b592c1c96f5472311 (diff)
downloadcaffeonacl-23bfeeb14381aa31e7d355afeddf9676ca1a3347.tar.gz
caffeonacl-23bfeeb14381aa31e7d355afeddf9676ca1a3347.tar.bz2
caffeonacl-23bfeeb14381aa31e7d355afeddf9676ca1a3347.zip
add NetParameter required version number as breaking change for
V0NetParameter
Diffstat (limited to 'src/caffe/net.cpp')
-rw-r--r--src/caffe/net.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/caffe/net.cpp b/src/caffe/net.cpp
index 405cf1bc..580f9240 100644
--- a/src/caffe/net.cpp
+++ b/src/caffe/net.cpp
@@ -18,6 +18,8 @@ using std::pair;
using std::map;
using std::set;
+const int kNetParameterVersionNumber = 1;
+
namespace caffe {
template <typename Dtype>
@@ -325,6 +327,7 @@ void Net<Dtype>::ReadParamsFromTextFile(const string& param_file,
<< "V0NetParameter to NetParameter (see above); continuing anyway.";
}
}
+ CHECK_EQ(param->version(), kNetParameterVersionNumber);
}
template <typename Dtype>
@@ -345,6 +348,7 @@ void Net<Dtype>::ReadParamsFromBinaryFile(const string& param_file,
<< "V0NetParameter to NetParameter (see above); continuing anyway.";
}
}
+ CHECK_EQ(param->version(), kNetParameterVersionNumber);
}
template <typename Dtype>