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

Commit

Permalink
Merge pull request #347 from yd8534976/fix_pass_lookup
Browse files Browse the repository at this point in the history
Fix pass_lookup()
  • Loading branch information
yd8534976 authored Jul 2, 2019
2 parents c3689d4 + b97145f commit ef617da
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dlk/python/dlk/core/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,16 @@ def pass_lookup(graph: Graph) -> None:
placeholder[0].add_output('output', pe)
pe.add_outputs(quantizer.output_ops)

conv = quantizer.output_op_list[0]
conv.add_input('X', pe)
output_op = quantizer.output_op_list[0]

target_input_name = 'X'
for input_name in output_op._input_names:
if quantizer.equals(output_op._input_ops[input_name]):
target_input_name = input_name
break

output_op.add_input(target_input_name, pe)

graph.add_op(pe_lsb)
graph.add_op(pe_msb)
graph.add_op(pe)
Expand Down

0 comments on commit ef617da

Please sign in to comment.