diff options
author | Jacob Bohlin <jacob.bohlin@arm.com> | 2020-08-20 10:53:02 +0200 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2020-08-21 15:30:36 +0000 |
commit | 67e0d8f24fcb86115e834acd19dc57027b03ea4f (patch) | |
tree | 748a85cc9aca976b74e18d1e4bead38344c32922 /ethosu/vela/nn_graph.py | |
parent | 1575b9413de2569de25bb2520b898a91f24ad3b0 (diff) | |
download | ethos-u-vela-67e0d8f24fcb86115e834acd19dc57027b03ea4f.tar.gz |
MLBEDSW-2663: Handle optional tensors
Includes a number of changes:
* Handle non-existing optional inputs
* Handle disabled optional inputs (-1 indexed)
* Added unit tests for parsing operators
* Add bias tensor to the different Convolutions + FullyConnected if
it's missing.
Signed-off-by: Jacob Bohlin <jacob.bohlin@arm.com>
Change-Id: Ib88d2b610314b1c886fc0aef4f9da87430ce6ae5
Diffstat (limited to 'ethosu/vela/nn_graph.py')
-rw-r--r-- | ethosu/vela/nn_graph.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ethosu/vela/nn_graph.py b/ethosu/vela/nn_graph.py index bfab2270..b495828e 100644 --- a/ethosu/vela/nn_graph.py +++ b/ethosu/vela/nn_graph.py @@ -167,6 +167,8 @@ class Subgraph: visit_op_set.add(op) for inp in op.inputs: + if not inp: + continue if print_visit: print(inp, "adding consumer", op) visit_tensor(inp) @@ -190,6 +192,8 @@ class Subgraph: for ps in self.passes: for tens in ps.outputs + ps.inputs: + if not tens: + continue tens.consumer_list = [] # reset unvisited tensors to start with for tens in self.output_tensors: |