Skip to content

Commit

Permalink
Merge pull request #834 from sony/fix/20210311-fix-converter-error
Browse files Browse the repository at this point in the history
Remove redundant input for some funcs.
  • Loading branch information
TomonobuTsujikawa authored Mar 18, 2021
2 parents c3c43b3 + e962f1a commit 84b1d2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/src/nnabla/utils/converter/onnx/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,7 @@ def Pad(self, opset, func_list, n):
raise ValueError("Unsupported attribute {} was specified at {}"
.format(attr.name, n.op_type))
if opset == "11":
del func.input[1:]
pads = self.get_input_raw_data(n.input[1], TensorProto.INT64)
try:
value = self.get_input_raw_data(
Expand Down Expand Up @@ -2002,6 +2003,7 @@ def Slice(self, opset, func_list, n):
logger.info('Unsupported attribute {} was specified at {}'
.format(attr.name, n.op_type))
else:
del func.input[1:]
starts = self.get_input_raw_data(n.input[1], TensorProto.INT64)
ends = self.get_input_raw_data(n.input[2], TensorProto.INT64)
try:
Expand Down Expand Up @@ -2362,6 +2364,7 @@ def Upsample_9(self, func_list, n):
elif init.float_data:
scales.extend(init.float_data)
self._merged_inputs.append(n.input[1])
del func.input[1]
scales = [int(np.floor(i)) for i in scales]
output_shape = []
for i in range(len(input_shape)):
Expand Down

0 comments on commit 84b1d2c

Please sign in to comment.