Skip to content

Commit

Permalink
add channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurawly committed Sep 5, 2019
1 parent 2789011 commit 282f3f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions topi/python/topi/intel_graphics/conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ def _alter_conv2d_layout(attrs, inputs, tinfo, F):

copy_inputs = [s for s in inputs]
new_attrs = {k : attrs[k] for k in attrs.keys()}

if F.__name__ == 'tvm.relay.op':
# Derive channels for frontends (e.g ONNX) that miss "channel" field.
new_attrs["channels"] = inputs[1].checked_type.shape[attrs['kernel_layout'].index('O')]

data, kernel = tinfo[0], tinfo[1]
batch_size, in_channel, height, width = get_const_tuple(data.shape)

Expand Down

0 comments on commit 282f3f3

Please sign in to comment.