Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Commit

Permalink
Tensorflow frontend support added (with imagenet/inception model)
Browse files Browse the repository at this point in the history
  • Loading branch information
srkreddy1238 committed May 9, 2018
1 parent 319d9f1 commit d7b21bc
Show file tree
Hide file tree
Showing 7 changed files with 748 additions and 0 deletions.
14 changes: 14 additions & 0 deletions python/nnvm/compiler/build_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,20 @@ def build(graph, target=None, shape=None, dtype="float32",
# Apply optimization
with target:
graph = optimize(graph, shape, dtype, layout)

# Clear extra params without nodes.
arg_list = []
graph_idx = _graph.GraphIndex(graph)
for node in graph_idx.nodes:
if node['op'] == 'null':
arg_list.append(node['name'])

if params:
param_keys = list(params.keys())
for key in param_keys:
if key not in arg_list:
params.pop(key)

# Precompute prune
if params and cfg.pass_enabled("PrecomputePrune"):
graph, params = precompute_prune(graph, params)
Expand Down
1 change: 1 addition & 0 deletions python/nnvm/frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
from .coreml import from_coreml
from .keras import from_keras
from .darknet import from_darknet
from .tensorflow import from_tensorflow
Loading

0 comments on commit d7b21bc

Please sign in to comment.