神经网络是否有通用格式 [英] Is there a common format for neural networks

查看:74
本文介绍了神经网络是否有通用格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不同的团队使用不同的库来训练和运行神经网络(caffe,火炬,theano ...).这使共享变得困难:每个库都有其自己的格式来存储网络,并且每次要测试其他团队的工作时都必须安装一个新库.

Different teams use different libraries to train and run neural networks (caffe, torch, theano...). This makes sharing difficult: each library has its own format to store networks and you have to install a new library each time you want to test other teams' work.

我正在寻找解决方案,以减少繁琐的工作: -是否存在首选的(共享的)格式来存储神经网络? -是否有服务或库可以帮助处理不同类型的网络/或将一种类型转换为另一种类型?

I am looking for solutions to make this less tedious: - Is there a preferred (shared?) format to store neural networks? - Is there a service or library that can help handle different types of networks / or transform one type into another?

谢谢!

推荐答案

是否存在一种首选的(共享的)格式来存储神经网络?

Is there a preferred (shared?) format to store neural networks?

每个库/框架都有自己的序列化,例如Caffe使用协议缓冲区,Torch具有

Each library / framework has its own serialization, e.g. Caffe uses Protocol Buffers, Torch has a built-in serialization scheme and Theano objects can be serialized with pickle.

在某些情况下,例如 OverFeat 此答案以获取更多详细信息).请注意,这并不涵盖必须单独了解或表示的网络/模型的体系结构(例如

In some cases like OverFeat or darknet the weights and biases are stored on-disk in binary format via plain fwrite-s of the corresponding float(or double) contiguous arrays (see this answer for more details). Note that this does not cover the architecture of the network / model which has to be known or represented separately (like declared explicitly at load time).

也: libccv 之类的库将结构和权重存储在

Also: a library like libccv stores the structure and the weights in a SQLite database.

是否存在可以帮助处理不同类型的网络/或将一种类型转换为另一种类型的服务或库?

Is there a service or library that can help handle different types of networks / or transform one type into another?

我认为没有一个声称可以这样做的(元)库.但它存在提供便利转换器的独特项目.

I don't think there is a single (meta) library that claims to do so. But it exists distinct projects that provide convenient converters.

一些例子(并非详尽无遗):

Some examples (non exhaustive):

  • Caffe -> Torch: https://github.com/szagoruyko/loadcaffe
  • Torch -> Caffe: https://github.com/facebook/fb-caffe-exts
  • Caffe -> TensorFlow: https://github.com/ethereon/caffe-tensorflow

-

更新(2017-09年):两项值得注意的举措是:

UPDATE (2017-09): two noticeable initiatives are:

(1) ONNX 格式(又称为Open Neural Network Exchange):

(1) the ONNX format (a.k.a. Open Neural Network Exchange):

[...]一种表示深度学习模型的标准,该模型使模型可以在框架之间转移

[...] a standard for representing deep learning models that enables models to be transferred between frameworks

请参阅以下(2)苹果公司推出的 CoreML 格式:

(2) the CoreML format introduced by Apple:

[...]用于多种ML方法的公共文件格式(.mlmodel)[...]可以通过Xcode将这种格式的模型直接集成到应用程序中.

[...] a public file format (.mlmodel) for a broad set of ML methods [...] Models in this format can be directly integrated into apps through Xcode.

这篇关于神经网络是否有通用格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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