projects
/
platform
/
upstream
/
tvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73a9e99
)
fix #4670: add bias for fc layer (#4801)
author
kshitij12345
<kshitijkalambarkar@gmail.com>
Sun, 2 Feb 2020 18:57:12 +0000
(
00:27
+0530)
committer
GitHub
<noreply@github.com>
Sun, 2 Feb 2020 18:57:12 +0000
(10:57 -0800)
python/tvm/relay/testing/mobilenet.py
patch
|
blob
|
history
diff --git
a/python/tvm/relay/testing/mobilenet.py
b/python/tvm/relay/testing/mobilenet.py
index
f76b0c2
..
1b3ce03
100644
(file)
--- a/
python/tvm/relay/testing/mobilenet.py
+++ b/
python/tvm/relay/testing/mobilenet.py
@@
-120,7
+120,9
@@
def mobile_net(num_classes=1000, data_shape=(1, 3, 224, 224),
pool = relay.nn.global_avg_pool2d(data=body, layout=layout)
flatten = relay.nn.batch_flatten(data=pool)
weight = relay.var('fc_weight')
+ bias = relay.var('fc_bias')
fc = relay.nn.dense(data=flatten, weight=weight, units=num_classes)
+ fc = relay.nn.bias_add(fc, bias)
softmax = relay.nn.softmax(data=fc)
return relay.Function(relay.analysis.free_vars(softmax), softmax)