What's the different between .proto and .prototxt file

南楼画角 提交于 2019-12-06 03:01:37

问题


In caffe project, there are both .proto file and .prototxt file.

From Google Protocol Buffer documentation, .proto file defines the protocol, so what about the .prototxt, is it defined in Google Protocol Buffer, what's the different between them?


回答1:


The .proto file is used to describe the structure (the 'protocol') of the data to be serialized. The protobuf compiler can turn this file into python/or C++/or Java code to serialize and deserialize data with that structure

For the .prototxt file. Looking at the documentation here, we can see that, there are two different formats for serialized data (textual or binary). The text format is human-readable and modifiable (and the corresponding files usually have the extension .prototxt), but it takes up a lot more space than the binary format.



来源:https://stackoverflow.com/questions/44125534/whats-the-different-between-proto-and-prototxt-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!