Skip to content

Commit

Permalink
default options test
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaybati committed Jun 9, 2023
1 parent 43f407a commit 98baa66
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fLibrary/modelParserONNX.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,11 @@ def spreadInfo(trueShape, toBeTransformedShape):
elif layer == "AveragePool":
f.write(layer)
f.write("\n")
print(node.attribute)
modelArch.append(("AveragePool", [ioMap[node.input[0]]], [node.attribute[0].i, node.attribute[2].ints, node.attribute[3].ints])) #(ceil_mode, pads, strides)
names = [n.name for n in node.attribute]
attributes = [node.attribute[0].i if 'ceil_mode' in names else 0,
node.attribute[2].ints if 'pads' in names else [0,0,0,0],
node.attribute[3].ints if 'strides' in names else [1,1]]
modelArch.append(("AveragePool", [ioMap[node.input[0]]], attributes)) #(ceil_mode, pads, strides)
f.write(str(node.attribute[1].ints[0]))
f.write("\n")
ioMap[node.output[0]] = ioMap[node.input[0]]
Expand Down

0 comments on commit 98baa66

Please sign in to comment.