diff options
author | Jeff Donahue <jeff.donahue@gmail.com> | 2014-03-23 21:53:59 -0700 |
---|---|---|
committer | Jeff Donahue <jeff.donahue@gmail.com> | 2014-03-27 23:42:29 -0700 |
commit | 23bfeeb14381aa31e7d355afeddf9676ca1a3347 (patch) | |
tree | cb24bbb3394b1dc45986077af9d7ee32962ee4c6 /src/caffe/net.cpp | |
parent | 927642e40853db87d6ad674b592c1c96f5472311 (diff) | |
download | caffeonacl-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.cpp | 4 |
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> |