SINGA-252 Use the snapshot methods to dump and load models for pysinga Turn on _packed_ option of tenser protobuf message to make them more compact in size.
Now, the vgg-16 model reported in SINGA-248 is 528 MB. Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/7c12f402 Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/7c12f402 Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/7c12f402 Branch: refs/heads/master Commit: 7c12f402ad5279cf59865df755591be397c283a9 Parents: 538bdac Author: WANG Ji <[email protected]> Authored: Tue Sep 27 16:49:46 2016 +0800 Committer: WANG Ji <[email protected]> Committed: Tue Sep 27 16:49:46 2016 +0800 ---------------------------------------------------------------------- src/proto/core.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/7c12f402/src/proto/core.proto ---------------------------------------------------------------------- diff --git a/src/proto/core.proto b/src/proto/core.proto index dc5ed34..d455a9e 100644 --- a/src/proto/core.proto +++ b/src/proto/core.proto @@ -71,8 +71,8 @@ message TensorProto { repeated uint32 shape = 1; optional DataType data_type = 2; optional bool transpose = 3; - repeated float float_data = 4; - repeated double double_data = 5; - repeated int32 int_data = 6; + repeated float float_data = 4 [packed = true]; + repeated double double_data = 5 [packed = true]; + repeated int32 int_data = 6 [packed = true]; repeated bytes bytes_data = 7; }
