-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exp matcher #65
Exp matcher #65
Changes from 70 commits
4a6f3ba
6daeb73
2d9d193
291f9c7
f15048f
725e9d9
ee54a0b
53065fd
0f802fb
574f4d7
b046b82
7870206
55fbf77
eb1a510
324287c
d232e02
c7687e2
e66bf54
82f5e96
51641b8
428f59c
4a2cb98
4fc9b14
1bf33d5
4a07522
ad00ee1
74a2140
654a42f
4be2c6a
403ac64
4aea27e
351c061
8abc65f
c250561
fd525d9
c73e9fa
f0b938e
235a529
ea059f2
c5f8766
e5c665e
654b20d
22185fa
5b773e1
3736a42
390bccf
5f9c22c
6997508
89a9c8d
a0c6ae6
587eadb
0bd9bd8
7aed322
3c03ab0
bfb3a12
7dbd455
115bfa5
7b6502e
ddca306
b797413
fae1129
e90771a
2671be1
1121d72
0e46059
18a7697
9d52464
85c1758
3648a27
5ae22f7
8744bb1
665ecfd
f56b40b
40f846f
9d4153c
ca0d37b
ea99036
5677dd4
c3af9d3
5024724
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,9 +79,33 @@ In graph theory terminology, they are `leaf` nodes of your graph. | |
|
||
Run `utensor-cli convert --help` for detailed information. | ||
|
||
# Example | ||
# Use `utensor_cgen` as Library | ||
|
||
## Subgraph Isomorphic Matcher and Nodes Fusion | ||
|
||
With `uTensorGraphMatcher`, performing a subgraph isomorphic match, replace or manipulate the matched subgraph is just a few line of code! | ||
|
||
### Node Fusion | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For these few examples, you might want one or two sentences explaining what they user is looking for. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. I'll elaborate it more. |
||
|
||
![conv-pool-fuce](images/conv_pool_fuse.png) | ||
|
||
- Left: original graph | ||
- Middle: matched convolution layer | ||
- Right: replace the matched layer with specialized `QuantConvPool` node | ||
|
||
### Dropout Layer Removal | ||
|
||
![cnn-dropout](images/cnn_dropout.png) | ||
|
||
- Left: original graph with dropout Layers | ||
- Middle: matched dropout layers | ||
- Right: graph with dropout layers removed | ||
|
||
# Examples | ||
|
||
- [Deep Multilayer Perceptron](https://github.com/uTensor/utensor_cgen/tree/develop/tests/deep_mlp) | ||
- [End-to-End Convolution NN](https://github.com/uTensor/simple_cnn_tutorial) | ||
|
||
Please refer to [tests/deep_mlp](https://github.com/uTensor/utensor_cgen/tree/develop/tests/deep_mlp) for detailed example | ||
|
||
# User Guide | ||
|
||
|
@@ -100,12 +124,6 @@ Following steps are a general guild for user how to porting a `TensorFlow` proto | |
2. run `make tests` | ||
- Or you can use `pipenv run pytest tests` instead | ||
|
||
# Known Limitations | ||
|
||
- If you want to use dropout with placeholders for the `keep_prob`, you have to name the `keep_prob` placeholder by any name that starts with "keep_prob". | ||
- You can still use any input tensor with name starts with "keep_prob" as long as it's not the output tensor of a placeholder node. | ||
- You can't wrap `dropout` in any `namescope` | ||
|
||
# Philosophy | ||
|
||
- [12 Factor CLI App](https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46?fbclid=IwAR1Gfq0D7oh3b-mXaIMV3RwYu39TAPrPXfz5sBKC4Rz1t-cckvC8WjBVl_w) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
]}, | ||
install_requires=[ | ||
'Jinja2', | ||
'tensorflow', | ||
'tensorflow==1.13.1', | ||
'idx2numpy', | ||
'attrs', | ||
'click', | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
uTensorGraphMatcher
, performing common subgraph tasks such as isomorphic matching along with replacing or manipulating the matched subgraph(s) takes just a few line of code!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make a note here that future transforms will be based on our own graph constructor/builder.