Skip to content

Commit

Permalink
[converter] expand strides for conv ops (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc123 authored Apr 8, 2024
1 parent d8b2a34 commit 1fd562e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tinynn/converter/operators/torch/aten.py
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,9 @@ def parse(self, node, attrs, args, graph_converter):
inputs = [self.find_or_create_input(i, graph_converter) for i in range(end_index)]
outputs = self.to_tfl_tensors(self.output_names, self.output_tensors)

if len(stride) != len(padding) and len(stride) == 1:
stride = stride * len(padding)

if transpose == 0:
graph_converter.add_operator(
tfl.GenericConvOperator(inputs, outputs, stride, padding, dilation, output_padding, groups)
Expand Down

0 comments on commit 1fd562e

Please sign in to comment.