python 解析prototxt文件

安装

pip install prototxt_parser

代码

from prototxt_parser.prototxt_parser_main import parse

def read_prototxt(file)->dict:
    with open(file, 'r') as f:
        return parse(f.read())
不论你在什么时候开始,重要的是开始之后就不要停止。 不论你在什么时候结束,重要的是结束之后就不要悔恨。
原文地址:https://www.cnblogs.com/yunhgu/p/15749828.html