Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Caffe2 Quick Start Guide

You're reading from   Caffe2 Quick Start Guide Modular and scalable deep learning made easy

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789137750
Length 136 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ashwin Nanjappa Ashwin Nanjappa
Author Profile Icon Ashwin Nanjappa
Ashwin Nanjappa
Arrow right icon
View More author details
Toc

ONNX in Caffe2

Caffe2 has built-in support for ONNX. This includes support for exporting Caffe2 models to ONNX format and importing ONNX models directly for inference in Caffe2. C++ source files related to Caffe2's support of ONNX can be found in the onnx directory in the Caffe2 source code. Python source files that provide the frontend and backend support for ONNX can be found in the python/onnx directory in the Caffe2 source code.

The onnx/onnx_exporter.h and onnx/onnx_exporter.cc contain the definitions necessary to export a Caffe2 model to ONNX format. Support for exporting from Caffe2 to ONNX includes details such as the mapping from Caffe2 to ONNX for operators, data types, and transformations of data.

For example, in onnx/onnx_exporter.cc we find the following mapping of some Caffe2 operators to ONNX operators:

const std::unordered_map<std::string, std::string&gt...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image