.proto 和 .prototxt 文件有什么不同 [英] What's the different between .proto and .prototxt file

查看:64
本文介绍了.proto 和 .prototxt 文件有什么不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在caffe项目中,有.proto文件和.prototxt文件.

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

Google Protocol Buffer 文档中,.proto 文件定义了协议,那么 .prototxt 呢,它是否在 Google 协议中定义缓冲区,它们之间有什么不同?

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?

推荐答案

.proto 文件用于描述要序列化的数据的结构(协议").protobuf 编译器可以将此文件转换为 python/或 C++/或 Java 代码,以使用该结构对数据进行序列化和反序列化

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

对于 .prototxt 文件.查看文档此处,我们可以看到,有两种不同的格式序列化数据(文本或二进制).文本格式是人类可读和可修改的(并且相应的文件通常具有扩展名.prototxt),但它比二进制格式占用更多的空间.

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.

这篇关于.proto 和 .prototxt 文件有什么不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆