Diving Into a DNNC | Towards AI

Deep Learning with DNN Compiler

PART-1

Rohit Sharma
Oct 13, 2019 · 4 min read
DNN Compiler (github.com/ai-techsystems/dnnCompiler)

What’s DNN Compiler?

So what is a tensor?

Tensors in DNNC

So how do we create tensors?

>>> dc.zeros(3,3)
[[0.000000 0.000000 0.000000]
[0.000000 0.000000 0.000000]
[0.000000 0.000000 0.000000]]
>>> a=dc.ones(2,2)
>>> a
[[1.000000 1.000000]
[1.000000 1.000000]]
>>> python_list=[[2,4,6],[1,3,5]]
>>> a=dc.array(python_list)
>>> a
[[2.000000 4.000000 6.000000]
[1.000000 3.000000 5.000000]]
>>> a.rank()
2
>>> a.shape()
(2, 3)
DNNC tensor methods

Operators

Pythonic Operators

>>> python_list=[[2,4,6],[1,3,5]]
>>> a=dc.array(python_list)
>>> a
[[2.000000 4.000000 6.000000]
[1.000000 3.000000 5.000000]]
>>> y=a+2; # <<<-----------------
>>> y
[[4.000000 6.000000 8.000000]
[3.000000 5.000000 7.000000]]

NN operators

DNNC help in Python IDEs
List of operators supported in DNNC

How do I try it out?

DNN Compiler (github.com/ai-techsystems/dnnCompiler)

One More Thing! ☝

Towards AI

Towards AI, is the world’s fastest-growing AI community for learning, programming, building and implementing AI.

Rohit Sharma

Written by

🏢 ai-techsystems.com | 🕊@srohit | 🔗 linkedin.com/in/srohit0 | ❔Quora: qr.ae/TWGSt9 | 💻 Github: srohit0.github.io

Towards AI

Towards AI, is the world’s fastest-growing AI community for learning, programming, building and implementing AI.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade