Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Caffe2 Quick Start Guide

You're reading from  Caffe2 Quick Start Guide

Product type Book
Published in May 2019
Publisher Packt
ISBN-13 9781789137750
Pages 136 pages
Edition 1st Edition
Languages
Author (1):
Ashwin Nanjappa Ashwin Nanjappa
Profile icon Ashwin Nanjappa

Building a computation graph

In this section, we will learn how to build a network in Caffe2 using model_helper. (model_helper was introduced earlier in this chapter.) To maintain the simplicity of this example, we use mathematical operators that require no trained parameters. So, our network is a computation graph rather than a neural network because it has no trained parameters that were learned from training data. The network we will build is illustrated by the graph shown in Figure 2.5:

Figure 2.5: Our simple computation graph with three operators

As you can see, we provide two inputs to the network: a matrix, A, and a vector, B. A MatMul operator is applied to A and B and its result is fed to a Sigmoid function, designated by σ in Figure 2.5. The result of the Sigmoid function is fed to a SoftMax function. (We will learn a bit more about the Sigmoid and SoftMax operators...

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 $15.99/month. Cancel anytime}