fixed two bugs with prototext format
authorDylan Paiton <dpaiton@yahoo-inc.com>
Wed, 17 Jun 2015 00:57:07 +0000 (17:57 -0700)
committerDylan Paiton <dpaiton@yahoo-inc.com>
Wed, 17 Jun 2015 00:57:07 +0000 (17:57 -0700)
commit98fb438c0d14f279d434719abd3e79b7f9d231ae
tree6bcc75e80b5bfa0faf34e80b6b1f65ac5b3582f5
parent0d7c6cb4b2286980c3d5b47cfddb2457202c93cf
fixed two bugs with prototext format

The first bug was in InitUnsharedWeightsNet. Proto var was of type
ostringstream, which converted the bool bias_term into an int. I
wrote an inline conditional to convert the term into a string.
This allows backwards compatibility with earlier prototext
versions (e.g. version 2.3.0 on Redhat was failing without this).

The second bug was in the syntax for repeated bool parameters,
assigned to the propagate_down parameter. The style used for e.g.
propagate_down: [true,true] does not work with earlier prototext
versions (failed with version 2.3.0 on Redhat). New syntax works
for all versions.
src/caffe/test/test_net.cpp